diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 11:15:35 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 11:15:35 +0000 |
commit | 29b6ba3e1646dc62b2a7d8e8b94004b8f7db7222 (patch) | |
tree | c11a325254c0fff96f54a201f14e401c959ece35 /gcc/ada/put_scos.adb | |
parent | c826347acfa81044d3222bb4531f57527334848a (diff) | |
download | gcc-29b6ba3e1646dc62b2a7d8e8b94004b8f7db7222.tar.gz |
2012-12-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb, scos.ads, put_scos.adb, put_scos.ads,
get_scos.adb: Generation of SCOs for aspects.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* sem_prag.adb (Check_Precondition_Postcondition): Remove
redundant call to Set_SCO_Pragma_Enabled (the pragma will be
rewritten into a pragma Check later on, and the call will be
made when processing the rewritten pragma).
(Analyze_Pragma, case Pragma_Check): Omit call to
Set_SCO_Pragma_Enabled if Split_PPC is set.
2012-12-05 Olivier Hainque <hainque@adacore.com>
* tracebak.c: Add partial support for Lynx178.
2012-12-05 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Analyze_Attribute): Improve
the error message related to loop assertions.
2012-12-05 Gary Dismukes <dismukes@adacore.com>
* atree.ads: Minor reformatting.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194211 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/put_scos.adb')
-rw-r--r-- | gcc/ada/put_scos.adb | 89 |
1 files changed, 39 insertions, 50 deletions
diff --git a/gcc/ada/put_scos.adb b/gcc/ada/put_scos.adb index 05184d7a985..e9b03fc8294 100644 --- a/gcc/ada/put_scos.adb +++ b/gcc/ada/put_scos.adb @@ -23,10 +23,9 @@ -- -- ------------------------------------------------------------------------------ +with Namet; use Namet; with Opt; use Opt; -with Par_SCO; use Par_SCO; with SCOs; use SCOs; -with Snames; use Snames; procedure Put_SCOs is Current_SCO_Unit : SCO_Unit_Index := 0; @@ -195,18 +194,10 @@ begin if Sent.C1 = 'S' and then (Sent.C2 = 'P' or else Sent.C2 = 'p') - and then Sent.Pragma_Name /= Unknown_Pragma + and then Sent.Pragma_Aspect_Name /= No_Name then - -- Strip leading "PRAGMA_" - - declare - Pnam : constant String := - Sent.Pragma_Name'Img; - begin - Output_String - (Pnam (Pnam'First + 7 .. Pnam'Last)); - Write_Info_Char (':'); - end; + Write_Info_Name (Sent.Pragma_Aspect_Name); + Write_Info_Char (':'); end if; end if; @@ -240,57 +231,55 @@ begin -- Decision - when 'E' | 'G' | 'I' | 'P' | 'W' | 'X' => + when 'E' | 'G' | 'I' | 'P' | 'W' | 'X' | 'A' => Start := Start + 1; - -- For disabled pragma, or nested decision therein, skip - -- decision output. + Write_SCO_Initiate (U); + Write_Info_Char (T.C1); - if SCO_Pragma_Disabled (T.Pragma_Sloc) then - while not SCO_Table.Table (Start).Last loop - Start := Start + 1; - end loop; + if T.C1 = 'A' then + Write_Info_Name (T.Pragma_Aspect_Name); + end if; + + if T.C1 /= 'X' then + Write_Info_Char (' '); + Output_Source_Location (T.From); + end if; - -- For all other cases output decision line + -- Loop through table entries for this decision - else - Write_SCO_Initiate (U); - Write_Info_Char (T.C1); + loop + declare + T : SCO_Table_Entry + renames SCO_Table.Table (Start); - if T.C1 /= 'X' then + begin Write_Info_Char (' '); - Output_Source_Location (T.From); - end if; - -- Loop through table entries for this decision + if T.C1 = '!' or else + T.C1 = '&' or else + T.C1 = '|' + then + Write_Info_Char (T.C1); + Output_Source_Location (T.From); - loop - declare - T : SCO_Table_Entry - renames SCO_Table.Table (Start); + else + Write_Info_Char (T.C2); + Output_Range (T); + end if; - begin - Write_Info_Char (' '); + exit when T.Last; + Start := Start + 1; + end; + end loop; - if T.C1 = '!' or else - T.C1 = '&' or else - T.C1 = '|' - then - Write_Info_Char (T.C1); - Output_Source_Location (T.From); + Write_Info_Terminate; - else - Write_Info_Char (T.C2); - Output_Range (T); - end if; + when ASCII.NUL => - exit when T.Last; - Start := Start + 1; - end; - end loop; + -- Nullified entry: skip - Write_Info_Terminate; - end if; + null; when others => raise Program_Error; |