+2011-08-04 Emmanuel Briot <briot@adacore.com>
+
+ * make.adb: Remove debug trace.
+
+2011-08-04 Vincent Celier <celier@adacore.com>
+
+ * makeutl.adb (Do_Complete): Get the absolute path name of a relative
+ path in canonical form, to be able to compare path names on platforms
+ such as Windows or Darwin.
+
+2011-08-04 Thomas Quinot <quinot@adacore.com>
+
+ * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
+ For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
+ * scos.ads: Update documentation accordingly.
+ * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
+ pragmas.
+
2011-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
Info := Mains.Next_Main;
exit when Info = No_Main_Info;
- Debug_Output ("MANU Got main: ", Name_Id (Info.File));
- Debug_Output ("MANU in project: ", Info.Project.Name);
-
Proj := Ultimate_Extending_Project_Of (Info.Project);
if Real_Main_Project = No_Project then
Normalize_Pathname
(Name => Main,
Directory => "",
- Resolve_Links => False);
+ Resolve_Links => False,
+ Case_Sensitive => False);
begin
File.File := Create_Name (Absolute);
Main_Id := Create_Name (Base);
Index := Condition_Pragma_Hash_Table.Get (Loc);
- -- The test here for zero is to deal with possible previous errors
+ -- The test here for zero is to deal with possible previous errors, and
+ -- for the case of pragma statement SCOs, for which we always set the
+ -- Pragma_Sloc even if the particular pragma cannot be specifically
+ -- disabled.
if Index /= 0 then
pragma Assert (SCO_Table.Table (Index).C1 = 'P');
end if;
declare
- SCE : SC_Entry renames SC.Table (J);
+ SCE : SC_Entry renames SC.Table (J);
+ Pragma_Sloc : Source_Ptr := No_Location;
begin
+ -- For the statement SCO for a pragma, set Pragma_Sloc so that
+ -- the SCO can be omitted if the pragma is disabled.
+
+ if SCE.Typ = 'P' then
+ Pragma_Sloc := SCE.From;
+ end if;
+
Set_Table_Entry
- (C1 => C1,
- C2 => SCE.Typ,
- From => SCE.From,
- To => SCE.To,
- Last => (J = SC_Last));
+ (C1 => C1,
+ C2 => SCE.Typ,
+ From => SCE.From,
+ To => SCE.To,
+ Last => (J = SC_Last),
+ Pragma_Sloc => Pragma_Sloc);
end;
end loop;
pragma Assert (Start <= Stop);
Output_SCO_Line : declare
- T : SCO_Table_Entry renames SCO_Table.Table (Start);
+ T : SCO_Table_Entry renames SCO_Table.Table (Start);
+ Continuation : Boolean;
begin
case T.C1 is
-- Statements
when 'S' =>
- Write_Info_Initiate ('C');
- Write_Info_Char ('S');
-
Ctr := 0;
+ Continuation := False;
loop
+ if SCO_Table.Table (Start).C2 = 'P'
+ and then SCO_Pragma_Disabled
+ (SCO_Table.Table (Start).Pragma_Sloc)
+ then
+ goto Next_Statement;
+ end if;
+
+ if Ctr = 0 then
+ Write_Info_Initiate ('C');
+ if not Continuation then
+ Write_Info_Char ('S');
+ Continuation := True;
+ else
+ Write_Info_Char ('s');
+ end if;
+ end if;
+
Write_Info_Char (' ');
if SCO_Table.Table (Start).C2 /= ' ' then
end if;
Output_Range (SCO_Table.Table (Start));
- exit when SCO_Table.Table (Start).Last;
- Start := Start + 1;
- pragma Assert (SCO_Table.Table (Start).C1 = 's');
+ -- Increment entry counter (up to 6 entries per line,
+ -- continuation lines are marked Cs).
Ctr := Ctr + 1;
-
- -- Up to 6 items on a line, if more than 6 items,
- -- continuation lines are marked Cs.
-
if Ctr = 6 then
Write_Info_Terminate;
- Write_Info_Initiate ('C');
- Write_Info_Char ('s');
Ctr := 0;
end if;
+
+ <<Next_Statement>>
+ exit when SCO_Table.Table (Start).Last;
+ Start := Start + 1;
+ pragma Assert (SCO_Table.Table (Start).C1 = 's');
end loop;
Write_Info_Terminate;
Last : Boolean;
Pragma_Sloc : Source_Ptr := No_Location;
- -- For a SCO nested with a pragma Debug/Assert/PPC, location of pragma
- -- (used for control of SCO output, value not recorded in ALI file).
+ -- For the statement SCO for a pragma, or for any expression SCO nested
+ -- in a pragma Debug/Assert/PPC, location of PRAGMA token (used for
+ -- control of SCO output, value not recorded in ALI file).
end record;
package SCO_Table is new GNAT.Table (