From: Adam Beneschan <adam@irvine.com>
Subject: Re: Warning when compiling s-interr.adb runtime file with -gnatc
Date: Thu, 25 Sep 2008 17:47:53 -0700 (PDT)
Date: 2008-09-25T17:47:53-07:00 [thread overview]
Message-ID: <6e2f6890-a905-477d-ba7a-1e41669786b0@v39g2000pro.googlegroups.com> (raw)
In-Reply-To: ff409655-2568-463b-92d8-844078678708@m73g2000hsh.googlegroups.com
On Sep 25, 3:17 pm, David Sauvage <sauvage.da...@gmail.com> wrote:
> When compiling s-interr.adb runtime file with -gnatc [1] produce a
> warning [2]. This warning is not raise when compiling wihtout -gnatc.
>
> Does the target and source types [3] really have different sizes ? or
> may be it's a problem on gnat ?
>
> [1]
> -gnatc Check syntax and semantics only (no code generation)
>
> [2]
> $ gcc-4.3 -c -gnatpg -nostdinc -nostdlib -g -gnatc -I- -gnatA /usr/lib/
> gcc/i486-linux-gnu/4.3.2/rts-native/adainclude/s-interr.adb -I/usr/lib/
> gcc/i486-linux-gnu/4.3.2/rts-native/adainclude/
> s-interr.adb:569:07: warning: types for unchecked conversion have
> different sizes
>
> [3]
> s-interr.ads
> type Parameterless_Handler is access protected procedure;
> s-interr.adb
> 564 type Fat_Ptr is record
> 565 Object_Addr : System.Address;
> 566 Handler_Addr : System.Address;
> 567 end record;
> 568
> 569 function To_Fat_Ptr is new Ada.Unchecked_Conversion
> 570 (Parameterless_Handler, Fat_Ptr);
>
I get the same warning with similar type declarations, but if I don't
use -gnatc and have my program output the 'Size of both types, it says
64 for both. Strange...
-- Adam
prev parent reply other threads:[~2008-09-26 0:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 22:17 Warning when compiling s-interr.adb runtime file with -gnatc David Sauvage
2008-09-26 0:47 ` Adam Beneschan [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox