This patch updates Interafaces.C.Strings to match the RM as follows: In accordance with AI95-00161 pragma Preelaborable_Initialization is added for chars_ptr In accordance with AI95-00276 aliased keyword is added to declaration of chars_ptr_array
The following should compile quietly: with interfaces.C.Strings; with Interfaces.C.Pointers; package Char_Ptr_Ptr is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => Interfaces.C.Strings.chars_ptr, Element_Array => Interfaces.C.Strings.chars_ptr_array, Default_Terminator => Interfaces.C.Strings.Null_Ptr); Tested on x86_64-pc-linux-gnu, committed on trunk 2011-08-02 Robert Dewar <de...@adacore.com> * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
Index: i-cstrin.ads =================================================================== --- i-cstrin.ads (revision 177038) +++ i-cstrin.ads (working copy) @@ -45,8 +45,9 @@ -- strict aliasing assumptions for this type. type chars_ptr is private; + pragma Preelaborable_Initialization (chars_ptr); - type chars_ptr_array is array (size_t range <>) of chars_ptr; + type chars_ptr_array is array (size_t range <>) of aliased chars_ptr; Null_Ptr : constant chars_ptr;