comp.lang.ada
 help / color / mirror / Atom feed
From: robert_s_quinn@yahoo.com (Robert Quinn)
Subject: Re: Is this a GNAT bug???
Date: 30 Apr 2002 18:31:23 -0700
Date: 2002-05-01T01:31:23+00:00	[thread overview]
Message-ID: <db500a4f.0204301731.391cd20a@posting.google.com> (raw)
In-Reply-To: 9gBz8.4053$451.2378814669@newssvr21.news.prodigy.com

tmoran@acm.org wrote in message news:<9gBz8.4053$451.2378814669@newssvr21.news.prodigy.com>...

> > type Message_Type_Access is access Message_Type;
> > function Get_Message_Data is new Unchecked_Conversion
> >    (SOURCE => System.ADDRESS,
> >     TARGET => Message_Type_Access);

>   This is not good Ada.  [snip] There is no reason to
> assume an unchecked conversion from System.Address to an access
> type will work as you hope.

Ahh, thanks for the note.  I used the Unchecked_Conversion out of
ignorance and habit, since the system I actually work on uses it a
lot.  Addresses are passed between tasks and then converted to an
appropriate access type.  Or sometimes data is read off a socket, an
address passed to a task, then converted to an appropriate access
type.  So I've seen this method used for both intertask communications
and for client-server communications.

Anyway I seledom delve into this realm, which is why I'm asking
questions - thanks!

Robert Quinn



  reply	other threads:[~2002-05-01  1:31 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-26 16:36 Is this a GNAT bug??? Robert Quinn
2002-04-26 17:48 ` Mark Johnson
2002-04-26 22:20   ` Robert Dewar
2002-04-29 15:45   ` Robert Quinn
2002-04-30  2:44     ` Robert Dewar
2002-04-30 14:15       ` Larry Kilgallen
2002-04-30 16:41       ` Robert Quinn
2002-04-30 18:20         ` tmoran
2002-05-01  1:31           ` Robert Quinn [this message]
2002-05-01 17:08             ` Ted Dennison
2002-05-02  1:55               ` Larry Kilgallen
2002-05-02 14:04                 ` Mark Johnson
2002-05-02 15:25                   ` Larry Kilgallen
2002-04-30 21:55         ` Mark Johnson
2002-05-01 22:59           ` Nick Roberts
2002-05-02 13:56             ` Mark Johnson
2002-05-02 20:19               ` Nick Roberts
2002-05-02 21:55                 ` Mark Johnson
  -- strict thread matches above, loose matches on Subject: below --
2003-09-20 22:50 Is this a gnat bug? Waldek Hebisch
2003-09-20 23:09 ` Ludovic Brenta
2003-09-21  2:37 ` Waldek Hebisch
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox