From 4d20c9591561bea6f51240d350303169773c2a2a Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Fri, 5 Jul 2013 10:26:21 +0000 Subject: [PATCH] gnat_rm.texi: Document that -gnatR and -gnatD cannot be used together. 2013-07-05 Robert Dewar * 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 | 7 +++++++ gcc/ada/gnat_rm.texi | 20 ++++++++++++++++++++ gcc/ada/switch-c.adb | 29 +++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 72d6bb40f14..66c293ba5e9 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2013-07-05 Robert Dewar + + * 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 * gnat_rm.texi: Add missing documentation for pragmas. diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 67ba282793d..27225435546 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -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 diff --git a/gcc/ada/switch-c.adb b/gcc/ada/switch-c.adb index 96416a5e546..0fc6bdb2188 100644 --- a/gcc/ada/switch-c.adb +++ b/gcc/ada/switch-c.adb @@ -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); -- 2.30.2