gnat_rm.texi: Document that -gnatR and -gnatD cannot be used together.
authorRobert Dewar <dewar@adacore.com>
Fri, 5 Jul 2013 10:26:21 +0000 (10:26 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 5 Jul 2013 10:26:21 +0000 (12:26 +0200)
2013-07-05  Robert Dewar  <dewar@adacore.com>

* gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
together.
* switch-c.adb: Do not allow -gnatD and -gnatR to both be
specified.

From-SVN: r200701

gcc/ada/ChangeLog
gcc/ada/gnat_rm.texi
gcc/ada/switch-c.adb

index 72d6bb4..66c293b 100644 (file)
@@ -1,5 +1,12 @@
 2013-07-05  Robert Dewar  <dewar@adacore.com>
 
+       * gnat_rm.texi: Document that -gnatR and -gnatD cannot be used
+       together.
+       * switch-c.adb: Do not allow -gnatD and -gnatR to both be
+       specified.
+
+2013-07-05  Robert Dewar  <dewar@adacore.com>
+
        * gnat_rm.texi: Add missing documentation for pragmas.
        * sem_ch8.adb: Minor reformatting.
        * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
index 67ba282..2722543 100644 (file)
@@ -189,6 +189,7 @@ Implementation Defined Pragmas
 * Pragma No_Body::
 * Pragma No_Inline::
 * Pragma No_Return::
+* Pragma No_Run_Time::
 * Pragma No_Strict_Aliasing ::
 * Pragma Normalize_Scalars::
 * Pragma Obsolescent::
@@ -995,6 +996,7 @@ consideration, the use of these pragmas should be minimized.
 * Pragma No_Body::
 * Pragma No_Inline::
 * Pragma No_Return::
+* Pragma No_Run_Time::
 * Pragma No_Strict_Aliasing::
 * Pragma Normalize_Scalars::
 * Pragma Obsolescent::
@@ -4316,6 +4318,24 @@ Note that in Ada 2005 mode, this pragma is part of the language. It is
 available in all earlier versions of Ada as an implementation-defined
 pragma.
 
+@node Pragma No_Run_Time
+@unnumberedsec Pragma No_Run_Time
+@findex No_Run_Time
+@noindent
+Syntax:
+
+@smallexample @c ada
+pragma No_Run_Time;
+@end smallexample
+
+@noindent
+This is an obsolete configuration pragma that historically was used to
+setup what is now called the "zero footprint" library. It causes any
+library units outside this basic library to be ignored. The use of
+this pragma has been superceded by the general configuration run-time
+capability of @code{GNAT} where the compiler takes into account whatever
+units happen to be accessible in the library.
+
 @node Pragma No_Strict_Aliasing
 @unnumberedsec Pragma No_Strict_Aliasing
 @findex No_Strict_Aliasing
index 96416a5..0fc6bdb 100644 (file)
@@ -394,6 +394,22 @@ package body Switch.C is
             when 'D' =>
                Ptr := Ptr + 1;
 
+               --  Not allowed if previous -gnatR given
+
+               --  The reason for this prohibition is that the rewriting of
+               --  Sloc values causes strange malfunctions in the tests of
+               --  whether units belong to the main source. This is really a
+               --  bug, but too hard to fix for a marginal capability ???
+
+               --  The proper fix is to completely redo -gnatD processing so
+               --  that the tree is not messed with, and instead a separate
+               --  table is built on the side for debug information generation.
+
+               if List_Representation_Info /= 0 then
+                  Osint.Fail
+                    ("-gnatD not permitted since -gnatR given previously");
+               end if;
+
                --  Scan optional integer line limit value
 
                if Nat_Present (Switch_Chars, Max, Ptr) then
@@ -988,9 +1004,22 @@ package body Switch.C is
             --  -gnatR (list rep. info)
 
             when 'R' =>
+
+               --  Not allowed if previous -gnatD given. See more extensive
+               --  comments in the 'D' section for the inverse test.
+
+               if Debug_Generated_Code then
+                  Osint.Fail
+                    ("-gnatR not permitted since -gnatD given previously");
+               end if;
+
+               --  Set to annotate rep info, and set default -gnatR mode
+
                Back_Annotate_Rep_Info := True;
                List_Representation_Info := 1;
 
+               --  Scan possible parameter
+
                Ptr := Ptr + 1;
                while Ptr <= Max loop
                   C := Switch_Chars (Ptr);