diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 11:26:56 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 11:26:56 +0100 |
commit | 10dfac72b18e12e0879c9d4f83af3526e2ab3b8a (patch) | |
tree | f501ba9ae8ea2bfa09e47d1a4bffbe9b637ac839 /gcc/ada/opt.ads | |
parent | ccfe725bc63fb3e3f279f1995a13b8b585bd6468 (diff) | |
download | gcc-10dfac72b18e12e0879c9d4f83af3526e2ab3b8a.zip gcc-10dfac72b18e12e0879c9d4f83af3526e2ab3b8a.tar.gz gcc-10dfac72b18e12e0879c9d4f83af3526e2ab3b8a.tar.bz2 |
[multiple changes]
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
over static predicates when the loop parameter specification
carries a Reverse indicator.
2015-01-07 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Instantiate_Object): If formal has a default,
actual is missing and formal has an anonymous access type, copy
access definition in full so that tree for instance is properly
formatted for ASIS use.
2015-01-07 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_Internal_Call_Continue): Give a warning
for P'Access, where P is a subprogram in the same package as
the P'Access, and the P'Access is evaluated at elaboration
time, and occurs before the body of P. For example, "X : T :=
P'Access;" would allow a subsequent call to X.all to be an
access-before-elaboration error; hence the warning. This warning
is enabled by the -gnatw.f switch.
* opt.ads (Warn_On_Elab_Access): New flag for warning switch.
* warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
* gnat_ugn.texi: Document the new warning.
From-SVN: r219293
Diffstat (limited to 'gcc/ada/opt.ads')
-rw-r--r-- | gcc/ada/opt.ads | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index a1ce246..e30af5c 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1669,6 +1669,13 @@ package Opt is -- Set to True to generate warnings for suspicious use of export or -- import pragmas. Modified by use of -gnatwx/X. + Warn_On_Elab_Access : Boolean := False; + -- GNAT + -- Set to True to generate warnings for P'Access in the case where + -- subprogram P is in the same package as the P'Access, and the P'Access is + -- evaluated at package elaboration time, and occurs before the body of P + -- has been elaborated. + Warn_On_Hiding : Boolean := False; -- GNAT -- Set to True to generate warnings if a declared entity hides another |