aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_intr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-07-20 15:06:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2009-07-20 15:06:01 +0200
commit6fb4cddeee68c3284e62389aadc9e505092c11a9 (patch)
treed18d20b93c356cb855681e19f4cae6b09a57c073 /gcc/ada/sem_intr.adb
parentae65d635df87446453628c005cacf2ed3850b9c6 (diff)
downloadgcc-6fb4cddeee68c3284e62389aadc9e505092c11a9.zip
gcc-6fb4cddeee68c3284e62389aadc9e505092c11a9.tar.gz
gcc-6fb4cddeee68c3284e62389aadc9e505092c11a9.tar.bz2
[multiple changes]
2009-07-20 Robert Dewar <dewar@adacore.com> * vms_data.ads: Minor reformatting * einfo.ads, einfo.adb (Parent_Subtype): Now allowed on record subtype, applies to base type. (Parent_Subtype): Now allowed on record subtype, applies to base type * exp_ch5.adb (Expand_Assign_Record): Handle Componentwise_Assignment for case of fully repped tagged type. (Make_Tag_Ctrl_Assignment): Set Componentwise_Assignment and avoid tag save/restore for fully repped tagged type case. * exp_util.ads, exp_util.adb (Is_Fully_Repped_Tagged_Type): New function * fe.h (Is_Fully_Repped_Tagged_Type): New function * sem_ch13.adb (Analyze_Recorrd_Representation_Clause): Check for overlap of tagged type components with parent type if parent type is fully repped. * sinfo.ads, sinfo.adb (Componentwise_Assignment): New flag * sem_res.adb (Check_No_Direct_Boolean_Operators): Remove handling of comparisons. (Resolve_Comparison_Operators): Remove No_Direct_Boolean_Operators check (Resolve_Equality_Op): Remove No_Direct_Boolean_Operators check * gnat_rm.texi: Restriction No_Direct_Boolean_Operators includes only logical operators (AND/OR/XOR), not comparison operators. * sprint.ads: Minor reformatting 2009-07-20 Ed Schonberg <schonberg@adacore.com> * sem_intr.adb (Check_Intrinsic_Call): For Import_Value and related intrinsics, check that argument is a string literal, rather than checking for staticness. From-SVN: r149811
Diffstat (limited to 'gcc/ada/sem_intr.adb')
-rw-r--r--gcc/ada/sem_intr.adb10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/sem_intr.adb b/gcc/ada/sem_intr.adb
index 0b7adc4..42136b1 100644
--- a/gcc/ada/sem_intr.adb
+++ b/gcc/ada/sem_intr.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -102,7 +102,9 @@ package body Sem_Intr is
Arg1 : constant Node_Id := First_Actual (N);
begin
- -- For Import_xxx calls, argument must be static string
+ -- For Import_xxx calls, argument must be static string. A string
+ -- literal is legal even in Ada83 mode, where such literals are
+ -- not static.
if Cnam = Name_Import_Address
or else
@@ -115,7 +117,9 @@ package body Sem_Intr is
then
null;
- elsif not Is_Static_Expression (Arg1) then
+ elsif Nkind (Arg1) /= N_String_Literal
+ and then not Is_Static_Expression (Arg1)
+ then
Error_Msg_FE
("call to & requires static string argument!", N, Nam);
Why_Not_Static (Arg1);