diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 15:28:35 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-08-01 15:28:35 +0200 |
commit | 4b259b2d0605d3da3357b46a35bd7ec92b1aaee1 (patch) | |
tree | cdf8ec1f9468fa7640be395895350c0363b5326d /gcc | |
parent | 12c5f1efb5d038d8638f517b8d73970573fbdaee (diff) | |
download | gcc-4b259b2d0605d3da3357b46a35bd7ec92b1aaee1.zip gcc-4b259b2d0605d3da3357b46a35bd7ec92b1aaee1.tar.gz gcc-4b259b2d0605d3da3357b46a35bd7ec92b1aaee1.tar.bz2 |
[multiple changes]
2014-08-01 Vincent Celier <celier@adacore.com>
* debug.adb: Minor documentation addition for -dn switch.
2014-08-01 Robert Dewar <dewar@adacore.com>
* sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
documentation of Is_Static_Expression vs Is_OK_Static_Expression.
In several places, use the Is_OK version as suggested by the spec.
2014-08-01 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Revert last change which was not correct.
2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Find_Constant): Ensure that the constant being
inspected is still an object declaration (i.e. not a renaming).
From-SVN: r213458
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 20 | ||||
-rw-r--r-- | gcc/ada/debug.adb | 10 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 2 | ||||
-rw-r--r-- | gcc/ada/freeze.adb | 9 | ||||
-rw-r--r-- | gcc/ada/gnatcmd.adb | 9 | ||||
-rw-r--r-- | gcc/ada/sem_aggr.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_eval.ads | 7 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 2 |
9 files changed, 48 insertions, 15 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index aa4d49c..d29f0201 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2014-08-01 Vincent Celier <celier@adacore.com> + + * debug.adb: Minor documentation addition for -dn switch. + +2014-08-01 Robert Dewar <dewar@adacore.com> + + * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb, + sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve + documentation of Is_Static_Expression vs Is_OK_Static_Expression. + In several places, use the Is_OK version as suggested by the spec. + +2014-08-01 Vincent Celier <celier@adacore.com> + + * gnatcmd.adb: Revert last change which was not correct. + +2014-08-01 Hristian Kirtchev <kirtchev@adacore.com> + + * freeze.adb (Find_Constant): Ensure that the constant being + inspected is still an object declaration (i.e. not a renaming). + 2014-08-01 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a) diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index 715e44a..94da7a6 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -791,15 +791,15 @@ package body Debug is -- dm Issue a message indicating the maximum number of simultaneous -- compilations. - -- Equivalent to --keep-temp-files. -- dn Do not delete temporary files created by gnatmake at the end -- of execution, such as temporary config pragma files, mapping - -- files or project path files. + -- files or project path files. This debug switch is equivalent to + -- the standard switch --keep-temp-files. We retain the debug switch + -- for back compatibility with past usage. -- dp Prints the Q used by routine Make.Compile_Sources every time -- we go around the main compile loop of Make.Compile_Sources - -- Equivalent to --keep-temp-files. -- dq Prints source files as they are enqueued and dequeued in the Q -- used by routine Make.Compile_Sources. Useful to figure out the @@ -822,7 +822,9 @@ package body Debug is -- dn Do not delete temporary files created by gprbuild at the end -- of execution, such as temporary config pragma files, mapping - -- files or project path files. + -- files or project path files. This debug switch is equivalent to + -- the standard switch --keep-temp-files. We retain the debug switch + -- for back compatibility with past usage. -- dt When a time stamp mismatch has been found for an ALI file, -- display the source file name, the time stamp expected and diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index d01e849..e42c187 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -8929,7 +8929,7 @@ package body Exp_Ch9 is function Non_Static_Bound (Bound : Node_Id) return Boolean is begin - if Is_Static_Expression (Bound) then + if Is_OK_Static_Expression (Bound) then return False; elsif Is_Entity_Name (Bound) diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 9332930..b59e6ec 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1256,12 +1256,19 @@ package body Freeze is function Find_Constant (Nod : Node_Id) return Traverse_Result is begin + -- When a constant is initialized with the result of a dispatching + -- call, the constant declaration is rewritten as a renaming of the + -- displaced function result. This scenario is not a premature use of + -- a constant even though the Has_Completion flag is not set. + if Is_Entity_Name (Nod) and then Present (Entity (Nod)) and then Ekind (Entity (Nod)) = E_Constant + and then Scope (Entity (Nod)) = Current_Scope + and then Nkind (Declaration_Node (Entity (Nod))) = + N_Object_Declaration and then not Is_Imported (Entity (Nod)) and then not Has_Completion (Entity (Nod)) - and then Scope (Entity (Nod)) = Current_Scope then Error_Msg_NE ("premature use of& in call or instance", N, Entity (Nod)); diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb index 2e5bade..77cf6dc 100644 --- a/gcc/ada/gnatcmd.adb +++ b/gcc/ada/gnatcmd.adb @@ -47,6 +47,7 @@ with Snames; use Snames; with Stringt; with Switch; use Switch; with Table; +with Targparm; use Targparm; with Tempdir; with Types; use Types; @@ -57,9 +58,6 @@ with Ada.Text_IO; use Ada.Text_IO; with GNAT.OS_Lib; use GNAT.OS_Lib; procedure GNATCmd is - - AAMP_On_Target : Boolean := False; - Normal_Exit : exception; -- Raise this exception for normal program termination @@ -1185,7 +1183,7 @@ procedure GNATCmd is -- No usage for Sync if C /= Sync then - if AAMP_On_Target then + if Targparm.AAMP_On_Target then Put ("gnaampcmd "); else Put ("gnat "); @@ -1590,7 +1588,8 @@ begin -- to handle the mapping of GNAAMP tool names. We don't extract it from -- system.ads, as there may be no default runtime. - AAMP_On_Target := To_Lower (Command_Name) = "gnaampcmd"; + Find_Program_Name; + AAMP_On_Target := Name_Buffer (1 .. Name_Len) = "gnaampcmd"; -- Put the command line in environment variable GNAT_DRIVER_COMMAND_LINE, -- so that the spawned tool may know the way the GNAT driver was invoked. diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index e5e236b..2c450c5 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -1732,7 +1732,7 @@ package body Sem_Aggr is ("subtype& has dynamic predicate, not allowed " & "in aggregate choice", Choice, E); - elsif not Is_Static_Subtype (E) then + elsif not Is_OK_Static_Subtype (E) then Error_Msg_NE ("non-static subtype& has predicate, not allowed " & "in aggregate choice", Choice, E); diff --git a/gcc/ada/sem_eval.ads b/gcc/ada/sem_eval.ads index 64d2529..72d0c99 100644 --- a/gcc/ada/sem_eval.ads +++ b/gcc/ada/sem_eval.ads @@ -52,7 +52,12 @@ package Sem_Eval is -- Is_Static_Expression -- This flag is set on any expression that is static according to the - -- rules in (RM 4.9(3-32)). + -- rules in (RM 4.9(3-32)). This flag should be tested during testing + -- of legality of parts of a larger static expression. For all other + -- contexts that require static expressions, use the separate predicate + -- Is_OK_Static_Expression, since an expression that meets the RM 4.9 + -- requirements, but raises a constraint error when evaluated in a non- + -- static context does not meet the legality requirements. -- Raises_Constraint_Error diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index adcad24..da08930 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -17757,7 +17757,7 @@ package body Sem_Prag is Preanalyze_Spec_Expression (Arg, RTE (RE_Any_Priority)); - if not Is_Static_Expression (Arg) then + if not Is_OK_Static_Expression (Arg) then Check_Restriction (Static_Priorities, Arg); end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 6c385e0..66967be 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -814,7 +814,7 @@ package body Sem_Util is if Nkind (Parent (N)) = N_Loop_Parameter_Specification and then not Has_Dynamic_Predicate_Aspect (Typ) - and then Is_Static_Subtype (Typ) + and then Is_OK_Static_Subtype (Typ) then return; end if; |