summaryrefslogtreecommitdiff
path: root/gcc/ada/cstand.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 18:57:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 18:57:01 +0200
commitea7f928bd69b0eaa870748848fe553876e4a1ace (patch)
tree884a1bbbf8c2279c1865ee83e881dcb0d56ebb3c /gcc/ada/cstand.adb
parentbb10b89181d4ad48e5dd82cf9d7c845c6206c08b (diff)
downloadgcc-ea7f928bd69b0eaa870748848fe553876e4a1ace.tar.gz
[multiple changes]
2010-06-22 Ed Schonberg <schonberg@adacore.com> * cstand.adb: Add tree nodes for pragma Pack on string types. 2010-06-22 Javier Miranda <miranda@adacore.com> * einfo.ads, einfo.adb (Last_Formal): New synthesized attribute. * exp_util.adb (Find_Prim_Op): Use new attribute to locate the last formal of a primitive. * exp_disp.adb (Is_Predefined_Dispatching_Operation, Is_Predefined_Dispatching_Alias): Use new attribute to locate the last formal of a primitive. * exp_cg.adb (Is_Predefined_Dispatching_Operation): Use new attribute to obtain the last formal of a primitive. 2010-06-22 Geert Bosch <bosch@adacore.com> * sysdep.c, init.c, adaint.c, cstreams.c: Remove conditional code depending on __EMX__ or MSDOS being defined. * i-cstrea.ads, gnat_rm.texi: Remove mentions of OS/2, DOS and Xenix. * a-excpol-abort.adb: Update comment indicating users of the file. * xref_lib.adb, sfn_scan.adb: Remove mention of OS/2, replace NT by Windows. * env.c: Remove empty conditional for MSDOS. * s-stchop.adb, g-dirope.ads, s-fileio.adb, osint.ads: Remove mention of OS/2 in comment. From-SVN: r161205
Diffstat (limited to 'gcc/ada/cstand.adb')
-rw-r--r--gcc/ada/cstand.adb20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb
index 76701813067..ec409d6ecb8 100644
--- a/gcc/ada/cstand.adb
+++ b/gcc/ada/cstand.adb
@@ -119,6 +119,10 @@ package body CStand is
(New_Node_Kind : Node_Kind := N_Defining_Identifier) return Entity_Id;
-- Builds a new entity for Standard
+ procedure Pack_String_Type (String_Type : Entity_Id);
+ -- Generate the proper tree for the pragma Pack that applies to each
+ -- string type.
+
procedure Print_Standard;
-- Print representation of package Standard if switch set
@@ -695,6 +699,7 @@ package body CStand is
Init_Size_Align (Standard_String);
Set_Alignment (Standard_String, Uint_1);
Set_Has_Pragma_Pack (Standard_String, True);
+ Pack_String_Type (Standard_String);
-- 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,
@@ -738,6 +743,7 @@ package body CStand is
Set_Component_Size (Standard_Wide_String, Uint_16);
Init_Size_Align (Standard_Wide_String);
Set_Has_Pragma_Pack (Standard_Wide_String, True);
+ Pack_String_Type (Standard_Wide_String);
-- Set index type of Wide_String
@@ -775,6 +781,7 @@ package body CStand is
Init_Size_Align (Standard_Wide_Wide_String);
Set_Is_Ada_2005_Only (Standard_Wide_Wide_String);
Set_Has_Pragma_Pack (Standard_Wide_Wide_String, True);
+ Pack_String_Type (Standard_Wide_Wide_String);
-- Set index type of Wide_Wide_String
@@ -1624,6 +1631,19 @@ package body CStand is
return E;
end New_Standard_Entity;
+ ----------------------
+ -- Pack_String_Type --
+ ----------------------
+
+ procedure Pack_String_Type (String_Type : Entity_Id) is
+ begin
+ Record_Rep_Item (String_Type,
+ Make_Pragma (Stloc,
+ Chars => Name_Pack,
+ Pragma_Argument_Associations =>
+ New_List (New_Occurrence_Of (String_Type, Stloc))));
+ end Pack_String_Type;
+
--------------------
-- Print_Standard --
--------------------