diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-03 09:21:55 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-03 09:21:55 +0000 |
commit | 550b60cd430a0869547576ee62b7774c9c7e213e (patch) | |
tree | 3725855258e586f8b68daed8cfdfe5efa06f8cf7 /gcc/ada/prj-part.adb | |
parent | 132f079abbcfa82c414832aad3aedfe77f2049f6 (diff) | |
download | gcc-550b60cd430a0869547576ee62b7774c9c7e213e.tar.gz |
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
to Errout_Handling.
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
"external" as an attribute name in aggregate projects.
2011-08-03 Jose Ruiz <ruiz@adacore.com>
* s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
from 0, so we need to adjust.
2011-08-03 Emmanuel Briot <briot@adacore.com>
* prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177244 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-part.adb')
-rw-r--r-- | gcc/ada/prj-part.adb | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ada/prj-part.adb b/gcc/ada/prj-part.adb index 7fedc86e368..3438fdee679 100644 --- a/gcc/ada/prj-part.adb +++ b/gcc/ada/prj-part.adb @@ -443,7 +443,7 @@ package body Prj.Part is (In_Tree : Project_Node_Tree_Ref; Project : out Project_Node_Id; Project_File_Name : String; - Always_Errout_Finalize : Boolean; + Errout_Handling : Errout_Mode := Always_Finalize; Packages_To_Check : String_List_Access := All_Packages; Store_Comments : Boolean := False; Current_Directory : String := ""; @@ -477,7 +477,10 @@ package body Prj.Part is Path => Path_Name_Id); Free (Real_Project_File_Name); - Prj.Err.Initialize; + if Errout_Handling /= Never_Finalize then + Prj.Err.Initialize; + end if; + Prj.Err.Scanner.Set_Comment_As_Token (Store_Comments); Prj.Err.Scanner.Set_End_Of_Line_As_Token (Store_Comments); @@ -607,13 +610,22 @@ package body Prj.Part is Project := Empty_Node; end if; - if No (Project) or else Always_Errout_Finalize then - Prj.Err.Finalize; + case Errout_Handling is + when Always_Finalize => + Prj.Err.Finalize; - -- Reinitialize to avoid duplicate warnings later on + -- Reinitialize to avoid duplicate warnings later on + Prj.Err.Initialize; - Prj.Err.Initialize; - end if; + when Finalize_If_Error => + if No (Project) then + Prj.Err.Finalize; + Prj.Err.Initialize; + end if; + + when Never_Finalize => + null; + end case; exception when X : others => |