From: Arnaud Charlet Date: Thu, 4 Aug 2011 12:22:53 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8fb3f5dff914cbff3d5c05af08cf5690436533c2;p=gcc.git [multiple changes] 2011-08-04 Emmanuel Briot * make.adb: Remove debug trace. 2011-08-04 Vincent Celier * 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 * 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. From-SVN: r177369 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f0256d7d1bd..1214985df52 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,21 @@ +2011-08-04 Emmanuel Briot + + * make.adb: Remove debug trace. + +2011-08-04 Vincent Celier + + * 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 + + * 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 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 4bbb61a70f7..b987462936d 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -5695,9 +5695,6 @@ package body Make is 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 diff --git a/gcc/ada/makeutl.adb b/gcc/ada/makeutl.adb index f9d4d728ed8..242df5e1497 100644 --- a/gcc/ada/makeutl.adb +++ b/gcc/ada/makeutl.adb @@ -1452,7 +1452,8 @@ package body Makeutl is 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); diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb index 4e1e433f100..2feec9c4471 100644 --- a/gcc/ada/par_sco.adb +++ b/gcc/ada/par_sco.adb @@ -765,7 +765,10 @@ package body Par_SCO is 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'); @@ -1071,14 +1074,23 @@ package body Par_SCO is 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; diff --git a/gcc/ada/put_scos.adb b/gcc/ada/put_scos.adb index b71652372ee..a1ee86ebf4f 100644 --- a/gcc/ada/put_scos.adb +++ b/gcc/ada/put_scos.adb @@ -95,7 +95,8 @@ begin 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 @@ -103,11 +104,26 @@ begin -- 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 @@ -115,22 +131,20 @@ begin 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; + + <> + exit when SCO_Table.Table (Start).Last; + Start := Start + 1; + pragma Assert (SCO_Table.Table (Start).C1 = 's'); end loop; Write_Info_Terminate; diff --git a/gcc/ada/scos.ads b/gcc/ada/scos.ads index 4039e4e541d..8799fbcc2db 100644 --- a/gcc/ada/scos.ads +++ b/gcc/ada/scos.ads @@ -355,8 +355,9 @@ package SCOs is 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 (