Commit 46414266 by Vincent Celier Committed by Arnaud Charlet

a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not allowed in no run time mode.

2011-08-04  Vincent Celier  <celier@adacore.com>

	* a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
	allowed in no run time mode.

2011-08-04  Vincent Celier  <celier@adacore.com>

	* make.adb (Check): When -gnatc is used, check for the source file
	inside the ALI file with a canonical case file name.

From-SVN: r177346
parent afab164f
2011-08-04 Vincent Celier <celier@adacore.com>
* a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
allowed in no run time mode.
2011-08-04 Vincent Celier <celier@adacore.com>
* make.adb (Check): When -gnatc is used, check for the source file
inside the ALI file with a canonical case file name.
2011-08-04 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
......
......@@ -315,6 +315,8 @@ package body Ada.Tags is
for E_Tag'Address use TSD.External_Tag.all'Address;
pragma Import (Ada, E_Tag);
Dup_Ext_Tag : constant String := "duplicated external tag """;
-- Start of processing for Check_TSD
begin
......@@ -324,7 +326,17 @@ package body Ada.Tags is
T := External_Tag_HTable.Get (To_Address (TSD.External_Tag));
if T /= null then
raise Program_Error with "duplicated external tag " & E_Tag;
-- Avoid concatenation, as it is not allowed in no run time mode
declare
Msg : String (1 .. Dup_Ext_Tag'Length + E_Tag_Len + 1);
begin
Msg (1 .. Dup_Ext_Tag'Length) := Dup_Ext_Tag;
Msg (Dup_Ext_Tag'Length + 1 .. Dup_Ext_Tag'Length + E_Tag_Len) :=
E_Tag;
Msg (Msg'Last) := '"';
raise Program_Error with Msg;
end;
end if;
end Check_TSD;
......
......@@ -1622,10 +1622,14 @@ package body Make is
if Operating_Mode = Check_Semantics then
declare
File_Name : constant String := Get_Name_String (Source_File);
File_Name : String := Get_Name_String (Source_File);
OK : Boolean := False;
begin
-- In the ALI file, the source file names are in canonical case
Canonical_Case_File_Name (File_Name);
for U in ALIs.Table (ALI).First_Unit ..
ALIs.Table (ALI).Last_Unit
loop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment