Commit 4d20c959 by Robert Dewar Committed by Arnaud Charlet

gnat_rm.texi: Document that -gnatR and -gnatD cannot be used together.

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
parent a1390a6e
2013-07-05 Robert Dewar <dewar@adacore.com> 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. * gnat_rm.texi: Add missing documentation for pragmas.
* sem_ch8.adb: Minor reformatting. * sem_ch8.adb: Minor reformatting.
* gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used * gnat_ugn.texi: Document that -gnatR and -gnatD cannot be used
......
...@@ -189,6 +189,7 @@ Implementation Defined Pragmas ...@@ -189,6 +189,7 @@ Implementation Defined Pragmas
* Pragma No_Body:: * Pragma No_Body::
* Pragma No_Inline:: * Pragma No_Inline::
* Pragma No_Return:: * Pragma No_Return::
* Pragma No_Run_Time::
* Pragma No_Strict_Aliasing :: * Pragma No_Strict_Aliasing ::
* Pragma Normalize_Scalars:: * Pragma Normalize_Scalars::
* Pragma Obsolescent:: * Pragma Obsolescent::
...@@ -995,6 +996,7 @@ consideration, the use of these pragmas should be minimized. ...@@ -995,6 +996,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma No_Body:: * Pragma No_Body::
* Pragma No_Inline:: * Pragma No_Inline::
* Pragma No_Return:: * Pragma No_Return::
* Pragma No_Run_Time::
* Pragma No_Strict_Aliasing:: * Pragma No_Strict_Aliasing::
* Pragma Normalize_Scalars:: * Pragma Normalize_Scalars::
* Pragma Obsolescent:: * Pragma Obsolescent::
...@@ -4316,6 +4318,24 @@ Note that in Ada 2005 mode, this pragma is part of the language. It is ...@@ -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 available in all earlier versions of Ada as an implementation-defined
pragma. 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 @node Pragma No_Strict_Aliasing
@unnumberedsec Pragma No_Strict_Aliasing @unnumberedsec Pragma No_Strict_Aliasing
@findex No_Strict_Aliasing @findex No_Strict_Aliasing
......
...@@ -394,6 +394,22 @@ package body Switch.C is ...@@ -394,6 +394,22 @@ package body Switch.C is
when 'D' => when 'D' =>
Ptr := Ptr + 1; 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 -- Scan optional integer line limit value
if Nat_Present (Switch_Chars, Max, Ptr) then if Nat_Present (Switch_Chars, Max, Ptr) then
...@@ -988,9 +1004,22 @@ package body Switch.C is ...@@ -988,9 +1004,22 @@ package body Switch.C is
-- -gnatR (list rep. info) -- -gnatR (list rep. info)
when 'R' => 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; Back_Annotate_Rep_Info := True;
List_Representation_Info := 1; List_Representation_Info := 1;
-- Scan possible parameter
Ptr := Ptr + 1; Ptr := Ptr + 1;
while Ptr <= Max loop while Ptr <= Max loop
C := Switch_Chars (Ptr); C := Switch_Chars (Ptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment