===================================================================
@@ -33,6 +33,7 @@
with Exp_Util; use Exp_Util;
with Expander; use Expander;
with Inline; use Inline;
+with Lib; use Lib;
with Namet; use Namet;
with Nlists; use Nlists;
with Nmake; use Nmake;
@@ -432,11 +433,12 @@
Add_Str_To_Name_Buffer ("failed invariant from ");
-- For all other checks, the string is "xxx failed at yyy"
- -- where xxx is the check name with current source file casing.
+ -- where xxx is the check name with appropriate casing.
else
Get_Name_String (Nam);
- Set_Casing (Identifier_Casing (Current_Source_File));
+ Set_Casing
+ (Identifier_Casing (Source_Index (Current_Sem_Unit)));
Add_Str_To_Name_Buffer (" failed at ");
end if;
===================================================================
@@ -9416,7 +9416,8 @@
if Is_Bad_Spelling_Of (Chars (Expr), Name_Enter) then
Set_Casing
- (Identifier_Casing (Current_Source_File));
+ (Identifier_Casing
+ (Source_Index (Current_Sem_Unit)));
Error_Msg_String (1 .. Rnm'Length) :=
Name_Buffer (1 .. Name_Len);
Error_Msg_Strlen := Rnm'Length;
===================================================================
@@ -1457,6 +1457,8 @@
procedure Labl is separate;
procedure Load is separate;
+ Result : List_Id := Empty_List;
+
-- Start of processing for Par
begin
@@ -1472,13 +1474,13 @@
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 @@
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;