cstand.adb (Create_Standard): When the target's storage unit size is greater than...
authorGary Dismukes <dismukes@adacore.com>
Fri, 6 Apr 2007 09:18:27 +0000 (11:18 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 6 Apr 2007 09:18:27 +0000 (11:18 +0200)
2007-04-06  Gary Dismukes  <dismukes@adacore.com>

* cstand.adb (Create_Standard): When the target's storage unit size is
greater than a byte, set Has_Non_Standard_Rep and Has_Pragma_Pack on
Standard_String.

From-SVN: r123555

gcc/ada/cstand.adb

index 5f4b2038c9830533956f1878f8654deceab6be5b..fecaa2a34ab5669ddbd66e5fff69cb6f404077ec 100644 (file)
@@ -683,6 +683,15 @@ package body CStand is
       Init_Size_Align    (Standard_String);
       Set_Alignment      (Standard_String, Uint_1);
 
+      --  On targets where a storage unit is larger than a byte (such as AAMP),
+      --  pragma Pack has a real effect on the representation of type String,
+      --  and the type must be marked as having a nonstandard representation.
+
+      if System_Storage_Unit > Uint_8 then
+         Set_Has_Non_Standard_Rep (Standard_String);
+         Set_Has_Pragma_Pack      (Standard_String);
+      end if;
+
       --  Set index type of String
 
       E_Id := First