summaryrefslogtreecommitdiff
path: root/gcc/ada/opt.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 10:02:31 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 10:02:31 +0000
commit218532897724b04c21abc44420b6d3f19f583ff7 (patch)
tree5763142f34ae94b7103a174f78d7a22414f8261f /gcc/ada/opt.ads
parentc238835e8beea12f3f6c76fd0a221646042f3c35 (diff)
downloadgcc-218532897724b04c21abc44420b6d3f19f583ff7.tar.gz
2014-06-13 Robert Dewar <dewar@adacore.com>
* lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit): Removed. * opt.ads (Compiler_Unit): New flag. * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit for null statement sequence (not allowed in compiler unit). * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during parsing. * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new calling sequence. * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for Check_Compiler_Unit. * sem_ch6.adb (Analyze_Extended_Return_Statement): Call Check_Compiler_Unit (this construct is not allowed in compiler units). * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]): Set Opt.Compiler_Unit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211617 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/opt.ads')
-rw-r--r--gcc/ada/opt.ads9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads
index a082389ae6f..cbd1045d822 100644
--- a/gcc/ada/opt.ads
+++ b/gcc/ada/opt.ads
@@ -375,6 +375,15 @@ package Opt is
-- set to True to delete only the files produced by the compiler but not
-- the library files or the executable files.
+ Compiler_Unit : Boolean := False;
+ -- GNAT1
+ -- Set True by an occurrence of pragma Compiler_Unit_Warning (or of the
+ -- obsolete pragma Compiler_Unit) in the main unit. Once set True, stays
+ -- True, since any units that are with'ed directly or indirectly by
+ -- a Compiler_Unit_Warning main unit are subject to the same restrictions.
+ -- Such units really should have their own pragmas, but we do not bother to
+ -- check for that, so this transitivity provides extra checking.
+
Config_File : Boolean := True;
-- GNAT
-- Set to False to inhibit reading and processing of gnat.adc file