diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 11:46:05 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 11:46:05 +0200 |
commit | f2a54683c6700df37ba3c0c99d7142fae89d59b1 (patch) | |
tree | 7727a03334efb8986c0dca51a91c3a5e9c4a17e4 /gcc/ada/par.adb | |
parent | 2df23f66e28fe9b4c9d533a650c9d65e20b4b1ba (diff) | |
download | gcc-f2a54683c6700df37ba3c0c99d7142fae89d59b1.tar.gz |
[multiple changes]
2017-04-25 Bob Duff <duff@adacore.com>
* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Use Source_Index (Current_Sem_Unit) to find the correct casing.
* exp_prag.adb (Expand_Pragma_Check): Use Source_Index
(Current_Sem_Unit) to find the correct casing.
* par.adb (Par): Null out Current_Source_File, to ensure that
the above bugs won't rear their ugly heads again.
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Type): For an attribute reference
'Class, if prefix type is synchronized and previous errors
have suppressed the creation of the corresponding record type,
create a spurious class-wide for the synchonized type itself,
to catch other misuses of the attribute
2017-04-25 Steve Baird <baird@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): if CodePeer_Mode
is True, then don't generate the accessibility check for the
tag of a tagged result.
* exp_intr.adb (Expand_Dispatching_Constructor_Call):
if CodePeer_Mode is True, then don't generate the
tag checks for the result of call to an instance of
Ada.Tags.Generic_Dispatching_Constructor (i.e., both the "is a
descendant of" check and the accessibility check).
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: Code cleanups.
* a-strbou.ads: minor whitespace fix in Trim for bounded strings.
* sem_ch8.ads: Minor comment fix.
From-SVN: r247168
Diffstat (limited to 'gcc/ada/par.adb')
-rw-r--r-- | gcc/ada/par.adb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/par.adb b/gcc/ada/par.adb index 26730d497e6..863149b0cdd 100644 --- a/gcc/ada/par.adb +++ b/gcc/ada/par.adb @@ -1457,6 +1457,8 @@ function Par (Configuration_Pragmas : Boolean) return List_Id is procedure Labl is separate; procedure Load is separate; + Result : List_Id := Empty_List; + -- Start of processing for Par begin @@ -1472,13 +1474,13 @@ begin begin loop if Token = Tok_EOF then - Compiler_State := Analyzing; - return Pragmas; + Result := Pragmas; + exit; elsif Token /= Tok_Pragma then Error_Msg_SC ("only pragmas allowed in configuration file"); - Compiler_State := Analyzing; - return Error_List; + Result := Error_List; + exit; else P_Node := P_Pragma; @@ -1690,7 +1692,9 @@ begin Restore_Opt_Config_Switches (Save_Config_Switches); Set_Comes_From_Source_Default (False); - Compiler_State := Analyzing; - return Empty_List; end if; + + Compiler_State := Analyzing; + Current_Source_File := No_Source_File; + return Result; end Par; |