diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 15:32:13 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 15:32:13 +0200 |
commit | 406935b64c887e2e7bb2882f4db5d2fa2e451b73 (patch) | |
tree | dc0e409b7901ff8a1bf1b8a411bb261a50030f21 /gcc/ada/sem_prag.adb | |
parent | cee0d6d251ede5cfd9873adec20f5a87b33022b7 (diff) | |
download | gcc-406935b64c887e2e7bb2882f4db5d2fa2e451b73.zip gcc-406935b64c887e2e7bb2882f4db5d2fa2e451b73.tar.gz gcc-406935b64c887e2e7bb2882f4db5d2fa2e451b73.tar.bz2 |
[multiple changes]
2011-08-05 Yannick Moy <moy@adacore.com>
* exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
if the node to wrap is a pragma check, this node and enclosed
expression are not expanded, so do not apply any transformations here.
* exp_prag.adb (Expand_Pragma_Check): document the need to avoid
introducing transient scopes.
2011-08-05 Jose Ruiz <ruiz@adacore.com>
* adaint.c (__gnat_set_writable, __gnat_set_readable,
__gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
__gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
routine is available, so we use the default implementation of these
functions.
* s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
support for copying attributes on VxWorks 6.
2011-08-05 Yannick Moy <moy@adacore.com>
* debug.adb: Remove use of -gnatd.D.
* gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
* opt.ads: Simplify variables for ALFA mode, to keep one only
* restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
to ALFA mode.
2011-08-05 Vincent Celier <celier@adacore.com>
* prj-conf.adb (Do_Autoconf): Look also for --RTS in
Builder'Default_Switches.
2011-08-05 Vincent Celier <celier@adacore.com>
* makeusg.adb: Add lines for --create-map-file switches.
2011-08-05 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Entity): For a subprogram, if a type in the
profile is incomplete and the full view is available, replace it with
the full view.
* sem_ch6.adb (Possible_Freeze): if a type in the profile is
incomplete, freezing the subprogram is delayed until the full view is
frozen.
* sem_type.adb (Disambiguate): an ambiguity between a user-defined
fixed-point multiplication operator and the predefined operator is
resolved in favor of the user-defined one.
From-SVN: r177432
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index fe9cb2e..de3e307 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -5059,9 +5059,9 @@ package body Sem_Prag is -- Start of processing for Process_Restrictions_Or_Restriction_Warnings begin - -- Ignore all Restrictions pragma in CodePeer mode + -- Ignore all Restrictions pragma in CodePeer and ALFA modes - if CodePeer_Mode then + if CodePeer_Mode or else ALFA_Mode then return; end if; @@ -5283,10 +5283,13 @@ package body Sem_Prag is -- Start of processing for Process_Suppress_Unsuppress begin - -- Ignore pragma Suppress/Unsuppress in codepeer mode on user code: - -- we want to generate checks for analysis purposes, as set by -gnatC + -- Ignore pragma Suppress/Unsuppress in CodePeer and ALFA modes on + -- user code: we want to generate checks for analysis purposes, as + -- set respectively by -gnatC and -gnatd.F - if CodePeer_Mode and then Comes_From_Source (N) then + if (CodePeer_Mode or else ALFA_Mode) + and then Comes_From_Source (N) + then return; end if; @@ -9444,11 +9447,12 @@ package body Sem_Prag is Check_Valid_Configuration_Pragma; Check_Restriction (No_Initialize_Scalars, N); - -- Initialize_Scalars creates false positives in CodePeer, - -- so ignore this pragma in this mode. + -- Initialize_Scalars creates false positives in CodePeer, and + -- incorrect negative results in ALFA mode, so ignore this pragma + -- in these modes. if not Restriction_Active (No_Initialize_Scalars) - and then not CodePeer_Mode + and then not (CodePeer_Mode or else ALFA_Mode) then Init_Or_Norm_Scalars := True; Initialize_Scalars := True; @@ -9475,10 +9479,10 @@ package body Sem_Prag is when Pragma_Inline_Always => GNAT_Pragma; - -- Pragma always active unless in CodePeer mode, since this causes - -- walk order issues. + -- Pragma always active unless in CodePeer or ALFA mode, since + -- this causes walk order issues. - if not CodePeer_Mode then + if not (CodePeer_Mode or else ALFA_Mode) then Process_Inline (True); end if; @@ -10917,10 +10921,11 @@ package body Sem_Prag is Check_Arg_Count (0); Check_Valid_Configuration_Pragma; - -- Normalize_Scalars creates false positives in CodePeer, so - -- ignore this pragma in this mode. + -- Normalize_Scalars creates false positives in CodePeer, and + -- incorrect negative results in ALFA mode, so ignore this pragma + -- in these modes. - if not CodePeer_Mode then + if not (CodePeer_Mode or else ALFA_Mode) then Normalize_Scalars := True; Init_Or_Norm_Scalars := True; end if; @@ -11287,9 +11292,9 @@ package body Sem_Prag is -- In the context of static code analysis, we do not need -- complex front-end expansions related to pragma Pack, - -- so disable handling of pragma Pack in this case. + -- so disable handling of pragma Pack in these cases. - if CodePeer_Mode then + if CodePeer_Mode or else ALFA_Mode then null; -- Don't attempt any packing for VM targets. We possibly |