From 218532897724b04c21abc44420b6d3f19f583ff7 Mon Sep 17 00:00:00 2001 From: charlet Date: Fri, 13 Jun 2014 10:02:31 +0000 Subject: 2014-06-13 Robert Dewar * 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 --- gcc/ada/opt.ads | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/ada/opt.ads') 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 -- cgit v1.2.1