comp.lang.ada
 help / color / mirror / Atom feed
* Adress => Access: types for unchecked conversion have different sizes
@ 2011-03-12 15:08 Martin Krischik
  2011-03-12 17:00 ` Edward Fish
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Martin Krischik @ 2011-03-12 15:08 UTC (permalink / raw)


Hello,

I currently have another go at building GNAT for MAx OS X. the current  
error message I am looking at is:

{{{
/Volumes/Daten/Developer/MacPorts/dports/lang/gnat-gcc/work/build/./gcc/xgcc  
-B/Volumes/Daten/Developer/MacPorts/dports/lang/gnat-gcc/work/build/./gcc/  
-B/opt/local/x86_64-apple-darwin10/bin/  
-B/opt/local/x86_64-apple-darwin10/lib/ -isystem  
/opt/local/x86_64-apple-darwin10/include -isystem  
/opt/local/x86_64-apple-darwin10/sys-include    -c -g -O2 -m32 -fPIC  
-pipe  -W -Wall -gnatpg -m32  a-direct.adb -o a-direct.o
a-direct.adb:676:13: warning: types for unchecked conversion have  
different sizes
}}}

The code in question is:

{{{
          declare
             subtype Path_String is String (1 .. Filename_Len);
             type    Path_String_Access is access Path_String;

             function Address_To_Access is new
               Ada.Unchecked_Conversion
                 (Source => Address,
                  Target => Path_String_Access);

             Path_Access : constant Path_String_Access :=
                             Address_To_Access (Filename_Addr);

          begin
             Last := Filename_Len;
             Name (1 .. Last) := Path_Access.all;
          end;
}}}

Strange. Anybody got an idea what went wrong here?

And I wonder if some `for Address use` magic would not be more appropriate  
here.

Regards

Martin
-- 
Martin Krischik
mailto://krischik@users.sourceforge.net
https://sourceforge.net/users/krischik



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-03-14 18:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-12 15:08 Adress => Access: types for unchecked conversion have different sizes Martin Krischik
2011-03-12 17:00 ` Edward Fish
2011-03-12 17:05 ` Simon Wright
2011-03-13  9:35   ` Martin Krischik
2011-03-13 11:57     ` Simon Wright
2011-03-13 13:03       ` Martin Krischik
2011-03-13  3:32 ` Randy Brukardt
2011-03-13  9:47   ` Martin Krischik
2011-03-13 23:16     ` Randy Brukardt
2011-03-14  7:26       ` Martin Krischik
2011-03-14 18:40         ` Simon Wright

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