diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-20 14:26:06 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-20 14:26:06 +0000 |
commit | b765640c115ff6ba1e38dcadf187dd001043424c (patch) | |
tree | f950b17bcbf2a70920676833247f508791695dab /gcc/ada/opt.adb | |
parent | 1171818d2b9ea08b3fa95e24fce319f9b0d90958 (diff) | |
download | gcc-b765640c115ff6ba1e38dcadf187dd001043424c.tar.gz |
2015-02-20 Tristan Gingold <gingold@adacore.com>
* opt.ads (GNAT_Mode_Config): New variable.
* opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
to set Assertions_Enabled.
* switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
for -gnatg.
2015-02-20 Robert Dewar <dewar@adacore.com>
* s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
comment regarding the handling of unterminated fixed-point
constants.
* s-valuns.ads (Scan_Raw_Unsigned): Add comments
corresponding to those previously added for
System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220866 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/opt.adb')
-rw-r--r-- | gcc/ada/opt.adb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/opt.adb b/gcc/ada/opt.adb index 0afab6515f3..64680968a61 100644 --- a/gcc/ada/opt.adb +++ b/gcc/ada/opt.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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- -- @@ -187,9 +187,10 @@ package body Opt is -- we do not expect to get any warnings from compiling such a unit. -- For an internal unit, assertions/debug pragmas are off unless this - -- is the main unit and they were explicitly enabled. We also make - -- sure we do not assume that values are necessarily valid and that - -- SPARK_Mode is set to its configuration value. + -- is the main unit and they were explicitly enabled, or unless the + -- main unit was compiled in GNAT mode. We also make sure we do not + -- assume that values are necessarily valid and that SPARK_Mode is + -- set to its configuration value. if Main_Unit then Assertions_Enabled := Assertions_Enabled_Config; @@ -198,7 +199,11 @@ package body Opt is SPARK_Mode := SPARK_Mode_Config; SPARK_Mode_Pragma := SPARK_Mode_Pragma_Config; else - Assertions_Enabled := False; + if GNAT_Mode_Config then + Assertions_Enabled := Assertions_Enabled_Config; + else + Assertions_Enabled := False; + end if; Assume_No_Invalid_Values := False; Check_Policy_List := Empty; SPARK_Mode := None; |