sem_prag.adb (Analyze_Pragma, [...]): Don't allow REASON parameter in compiler units...
authorRobert Dewar <dewar@adacore.com>
Tue, 10 Sep 2013 15:15:20 +0000 (15:15 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 10 Sep 2013 15:15:20 +0000 (17:15 +0200)
2013-09-10  Robert Dewar  <dewar@adacore.com>

* sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
REASON parameter in compiler units (bootstrap issues).

2013-09-10  Robert Dewar  <dewar@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Output warning if
-gnateE specified for a target that does not support it.

From-SVN: r202463

gcc/ada/ChangeLog
gcc/ada/gnat1drv.adb
gcc/ada/sem_prag.adb

index dc14a32..10c5594 100644 (file)
@@ -1,3 +1,13 @@
+2013-09-10  Robert Dewar  <dewar@adacore.com>
+
+       * sem_prag.adb (Analyze_Pragma, case Warnings): Don't allow
+       REASON parameter in compiler units (bootstrap issues).
+
+2013-09-10  Robert Dewar  <dewar@adacore.com>
+
+       * gnat1drv.adb (Adjust_Global_Switches): Output warning if
+       -gnateE specified for a target that does not support it.
+
 2013-09-10  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Handle properly
index fa959df..b0e3087 100644 (file)
@@ -242,7 +242,7 @@ procedure Gnat1drv is
 
          --  Enable assertions, since they give CodePeer valuable extra info
 
-         Assertions_Enabled    := True;
+         Assertions_Enabled := True;
 
          --  Disable all simple value propagation. This is an optimization
          --  which is valuable for code optimization, and also for generation
@@ -413,10 +413,10 @@ procedure Gnat1drv is
          --  which is more complex to formally verify than the original source.
 
          Tagged_Type_Expansion := False;
-
       end if;
 
-      --  Set Configurable_Run_Time mode if system.ads flag set
+      --  Set Configurable_Run_Time mode if system.ads flag set or if the
+      --  special debug flag -gnatdY is set.
 
       if Targparm.Configurable_Run_Time_On_Target or Debug_Flag_YY then
          Configurable_Run_Time_Mode := True;
@@ -571,6 +571,21 @@ procedure Gnat1drv is
          end if;
       end if;
 
+      --  Output warning if -gnateE specified and cannot be supported
+
+      if Exception_Extra_Info
+        and then Restrict.No_Exception_Handlers_Set
+      then
+         Set_Standard_Error;
+         Write_Str
+           ("warning: extra exception information (-gnateE) was specified");
+         Write_Eol;
+         Write_Str
+           ("warning: this capability is not available in this configuration");
+         Write_Eol;
+         Set_Standard_Output;
+      end if;
+
       --  Finally capture adjusted value of Suppress_Options as the initial
       --  value for Scope_Suppress, which will be modified as we move from
       --  scope to scope (by Suppress/Unsuppress/Overflow_Checks pragmas).
index 9a1332d..0cf4fc7 100644 (file)
@@ -17958,6 +17958,10 @@ package body Sem_Prag is
                then
                   Check_Arg_Is_Static_Expression (Last_Arg, Standard_String);
                   Arg_Count := Arg_Count - 1;
+
+                  --  Not allowed in compiler units (bootstrap issues)
+
+                  Check_Compiler_Unit (N);
                end if;
             end;