aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2004-05-03 13:58:34 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-05-03 13:58:34 +0200
commit9f4fd324ab932c0fbb3bf28f7230f17236ba2daa (patch)
treec63309227b71a108f3774e414aacfd0be78c8d20 /gcc/ada/sem_ch13.adb
parent178af0f39063ac9facc911211ab49dd274c0b851 (diff)
downloadgcc-9f4fd324ab932c0fbb3bf28f7230f17236ba2daa.zip
gcc-9f4fd324ab932c0fbb3bf28f7230f17236ba2daa.tar.gz
gcc-9f4fd324ab932c0fbb3bf28f7230f17236ba2daa.tar.bz2
[multiple changes]
2004-05-03 Olivier Hainque <hainque@act-europe.fr> PR ada/15152 * exp_ch2.adb (Expand_Current_Value): Leave Machine_Code Asm arguments alone. Replacing object references by literals is inappropriate in a so low level context. 2004-05-03 Arnaud Charlet <charlet@act-europe.fr> * a-exexpr.adb: Add comments 2004-05-03 Joel Brobecker <brobecker@gnat.com> * a-tags.adb (Tag_Table): Add Index_Check pragma Suppress. Allows us to declare the Ancestor_Tags array in Type_Specific_Data with a small size without risking a bounds check error when accessing one of its components. (Type_Specific_Data): Define Ancestor_Tags as a small array. This prevents us from hitting a limitation during the debug info generation when using stabs. * a-tags.adb (Dispatch_Table): Define the Prims_Ptr component as a small array. This prevents us from hitting a limitation during the debug info generation when using stabs. 2004-05-03 Eric Botcazou <ebotcazou@act-europe.fr> lang-specs.h: Remove -gnatz* from specs. 2004-05-03 Vincent Celier <celier@gnat.com> * gprmake.adb, makegpr.ads, makegpr.adb: New files. * Make-lang.in, Makefile.in: Add gprmake 2004-05-03 Thomas Quinot <quinot@act-europe.fr> * sem_aggr.adb: Fix typo in comment. 2004-05-03 Robert Dewar <dewar@gnat.com> * make.adb: Minor reformatting * rtsfind.ads, rtsfind.adb: (RTU_Loaded): New function * sem_attr.adb (Eval_Attribute, case Type_Class): Fix check for address so that it works when address is not a private type. * sem_ch13.adb (Check_Expr_Constants, case N_Integer_Literal): Deal properly with rewritten unchecked conversions. This prevents order-of-elaboration issues that can otherwise arise. (Minimum_Size): Don't check size of access types under VMS * sem_ch4.adb (Remove_Address_Interpretation): New circuit to remove interpretations of integer literals as type System.Address. * sem_util.ads, sem_util.adb (Is_Descendent_Of_Address): New function (Is_Descendent_Of): New function 2004-05-03 Jose Ruiz <ruiz@act-europe.fr> * sem_prag.adb: Boolean_Entry_Barriers is a synonym of Simple_Barriers. Max_Entry_Queue_Depth is a synonym of Max_Entry_Queue_Length. No_Dynamic_Interrupts is a synonym of No_Dynamic_Attachment. * sem_res.adb: Use the new restriction Max_Entry_Queue_Length instead of the old Max_Entry_Queue_Depth. * snames.adb: Boolean_Entry_Barriers is a synonym of Simple_Barriers. Max_Entry_Queue_Depth is a synonym of Max_Entry_Queue_Length No_Dynamic_Interrupts is a synonym of No_Dynamic_Attachment * snames.ads: New entry for proper handling of Boolean_Entry_Barriers. New entry for proper handling of Max_Entry_Queue_Depth. New entry for proper handling of No_Dynamic_Interrupts. * s-rident.ads: Adding restriction Simple_Barriers (AI-00249) that supersedes the GNAT specific restriction Boolean_Entry_Barriers. Adding restriction Max_Entry_Queue_Length (AI-00249) that supersedes the GNAT specific restriction Max_Entry_Queue_Depth. Adding restriction No_Dynamic_Attachment (AI-00249) that supersedes the GNAT specific restriction No_Dynamic_Interrupts. * restrict.ads, restrict.adb: Use the new restriction Simple_Barriers instead of the old Boolean_Entry_Barriers. Use the new restriction No_Dynamic_Attachment instead of the old No_Dynamic_Interrupts. * exp_ch9.adb: Check restriction Simple_Barriers (AI-00249) that supersedes the GNAT specific restriction Boolean_Entry_Barriers. * gnatbind.adb: Use the new restriction Max_Entry_Queue_Length instead of the old Max_Entry_Queue_Depth. 2004-05-03 GNAT Script <nobody@gnat.com> * Make-lang.in: Makefile automatically updated From-SVN: r81429
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb29
1 files changed, 25 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index e89041a..1da9566 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -45,6 +45,7 @@ with Snames; use Snames;
with Stand; use Stand;
with Sinfo; use Sinfo;
with Table;
+with Targparm; use Targparm;
with Ttypes; use Ttypes;
with Tbuild; use Tbuild;
with Urealp; use Urealp;
@@ -2699,8 +2700,19 @@ package body Sem_Ch13 is
end if;
end if;
- when N_Integer_Literal |
- N_Real_Literal |
+ when N_Integer_Literal =>
+
+ -- If this is a rewritten unchecked conversion, in a system
+ -- where Address is an integer type, always use the base type
+ -- for a literal value. This is user-friendly and prevents
+ -- order-of-elaboration issues with instances of unchecked
+ -- conversion.
+
+ if Nkind (Original_Node (Nod)) = N_Function_Call then
+ Set_Etype (Nod, Base_Type (Etype (Nod)));
+ end if;
+
+ when N_Real_Literal |
N_String_Literal |
N_Character_Literal =>
return;
@@ -3068,10 +3080,19 @@ package body Sem_Ch13 is
then
return 0;
- -- Access types
+ -- Access types. Normally an access type cannot have a size smaller
+ -- than the size of System.Address. The exception is on VMS, where
+ -- we have short and long addresses, and it is possible for an access
+ -- type to have a short address size (and thus be less than the size
+ -- of System.Address itself). We simply skip the check for VMS, and
+ -- leave the back end to do the check.
elsif Is_Access_Type (T) then
- return System_Address_Size;
+ if OpenVMS_On_Target then
+ return 0;
+ else
+ return System_Address_Size;
+ end if;
-- Floating-point types