comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Is this a GNAT bug???
Date: Tue, 30 Apr 2002 18:20:53 GMT
Date: 2002-04-30T18:20:53+00:00	[thread overview]
Message-ID: <9gBz8.4053$451.2378814669@newssvr21.news.prodigy.com> (raw)
In-Reply-To: db500a4f.0204300841.3f1f15a8@posting.google.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.  You almost certainly want to convert an
access type for one way of looking at the data to an access type
for a different way.  No "system.address" involved.  If, most
unusually, you actually do need to convert a System.Address to
an access type, use the standard System.Address_To_Access_Conversions,
which is defined exactly for that purpose, and which the compiler
will implement so it actually works.  There is no reason to
assume an unchecked conversion from System.Address to an access
type will work as you hope.



  reply	other threads:[~2002-04-30 18:20 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 [this message]
2002-05-01  1:31           ` Robert Quinn
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