aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/frontend.adb
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2010-10-04 13:27:57 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-04 15:27:57 +0200
commitea4ce0f7775af81231269f9c39206db30b7cb775 (patch)
tree762cf5586088eb7449e204245ad71d64685bca32 /gcc/ada/frontend.adb
parent1366997bf20c36a7d0701a4f4e09b7d8b523e828 (diff)
downloadgcc-ea4ce0f7775af81231269f9c39206db30b7cb775.zip
gcc-ea4ce0f7775af81231269f9c39206db30b7cb775.tar.gz
gcc-ea4ce0f7775af81231269f9c39206db30b7cb775.tar.bz2
frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before loading the main source...
2010-10-04 Vincent Celier <celier@adacore.com> * frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before loading the main source, so that if it is preprocessed and -gnateG is used, the preprocessed file is written. * lib.ads (Analysing_Subunit_Of_Main): New global variable to indicate if a subunit is from the main unit when it is loaded. * sem_ch10.adb (Analyze_Proper_Body): Set Lib.Analysing_Subunit_Of_Main to True before loading a subunit. * sem_ch12.adb (Copy_Generic_Node): Set Lib.Analysing_Subunit_Of_Main to True when the main is a generic unit before loading one of its subunits. * sinput-l.adb (Load_File): If -gnateG is used, write the preprocessed file only for the main unit (spec, body and subunits). From-SVN: r164934
Diffstat (limited to 'gcc/ada/frontend.adb')
-rw-r--r--gcc/ada/frontend.adb10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index 31c8fea..fd83b5d 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -116,6 +116,11 @@ begin
Prepcomp.Check_Symbols;
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;
+
-- Now that the preprocessing situation is established, we are able to
-- load the main source (this is no longer done by Lib.Load.Initialize).
@@ -127,11 +132,6 @@ begin
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