aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/frontend.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 16:41:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 16:41:21 +0200
commite1d9659dd302e125682c6ed7d5c613c7a1cbefdc (patch)
tree9cb2b579aa839975138da83d1ecbd610d043dbc7 /gcc/ada/frontend.adb
parentcd9909a0c90962131d6b58d0af701f6333ecd244 (diff)
downloadgcc-e1d9659dd302e125682c6ed7d5c613c7a1cbefdc.zip
gcc-e1d9659dd302e125682c6ed7d5c613c7a1cbefdc.tar.gz
gcc-e1d9659dd302e125682c6ed7d5c613c7a1cbefdc.tar.bz2
[multiple changes]
2010-09-10 Robert Dewar <dewar@adacore.com> * errout.adb: Remove tests of Parsing_Main_Subunit, since this test is now done in In_Extended_Main_Source_Unit. * errout.ads (Compiler_State[_Type]): Moved from Errout to Lib (Parsing_Main_Subunit): Moved from Errout to Lib and renamed as Parsing_Main_Extended_Source. * frontend.adb: Set Parsing_Main_Extended_Source True for parsing main unit. * lib-load.adb (Load_Unit): Add PMES parameter Set PMES appropriately in all calls to Load_Unit * lib-load.ads (Load_Unit): Add PMES parameter * lib.adb (In_Extended_Main_Source_Unit): When called with Compiler_State set to Parsing, test new flag Compiling_Main_Extended_Source. * lib.ads (Compiler_State[_Type]): Moved from Errout to Lib (Parsing_Main_Subunit): Moved from Errout to Lib and renamed as Parsing_Main_Extended_Source * par-load.adb (Load): Set PMES properly in call to Load_Unit 2010-09-10 Ed Schonberg <schonberg@adacore.com> * exp_cg.adb: Use proper entity to handle overloads. * sem_res.adb (Check_Parameterless_Call): An operator node without actuals cannot be a call, and must be treated as a string. From-SVN: r164182
Diffstat (limited to 'gcc/ada/frontend.adb')
-rw-r--r--gcc/ada/frontend.adb14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index 54616fe..31c8fea 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -121,12 +121,17 @@ begin
Lib.Load.Load_Main_Source;
- -- Return immediately if the main source could not be parsed
+ -- Return immediately if the main source could not be found
if Sinput.Main_Source_File = No_Source_File then
return;
end if;
+ -- We set Parsing_Main_Extended_Source true here to cover processing of all
+ -- the configuration pragma files, as well as the main source unit itself.
+
+ Parsing_Main_Extended_Source := True;
+
-- Read and process configuration pragma files if present
declare
@@ -229,9 +234,9 @@ begin
Optimize_Alignment := 'T';
end if;
- -- We have now processed the command line switches, and the gnat.adc
- -- file, so this is the point at which we want to capture the values
- -- of the configuration switches (see Opt for further details).
+ -- We have now processed the command line switches, and the configuration
+ -- pragma files, so this is the point at which we want to capture the
+ -- values of the configuration switches (see Opt for further details).
Opt.Register_Opt_Config_Switches;
@@ -252,6 +257,7 @@ begin
-- semantics in any case).
Discard_List (Par (Configuration_Pragmas => False));
+ Parsing_Main_Extended_Source := False;
-- The main unit is now loaded, and subunits of it can be loaded,
-- without reporting spurious loading circularities.