diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-05 14:32:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-05 14:32:46 +0000 |
commit | 8149276d3f4c4c6e5602388e2c9be2c50b705b78 (patch) | |
tree | e08fa47e3dc28c05eb306575c569f416823c5b73 /gcc/ada/prj-proc.adb | |
parent | 477d8dd465acc498856227cecc20d11a13014808 (diff) | |
download | gcc-8149276d3f4c4c6e5602388e2c9be2c50b705b78.tar.gz |
2015-02-05 Javier Miranda <miranda@adacore.com>
* errout.adb (Error_Msg_PT): Add missing error.
* sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
RM rule. Code cleanup.
* exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
anonymous access types. Found working on the tests. Code cleanup.
2015-02-05 Vincent Celier <celier@adacore.com>
* prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
when there are incomplete withs.
* prj-nmsc.adb (Process_Naming): Do not try to get the value
of an element when it is nil.
(Check_Naming): Do not check a nil suffix for illegality
* prj-proc.adb (Expression): Do not process an empty term.
* prj-strt.adb (Attribute_Reference): If attribute cannot be
found, parse a possible index to avoid cascading errors.
2015-02-05 Ed Schonberg <schonberg@adacore.com>
* sem_aux.adb (Is_Derived_Type): A subprogram_type generated
for an access_to_subprogram declaration is not a derived type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-proc.adb')
-rw-r--r-- | gcc/ada/prj-proc.adb | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/gcc/ada/prj-proc.adb b/gcc/ada/prj-proc.adb index ac2cc66ce31..0107aa0a45e 100644 --- a/gcc/ada/prj-proc.adb +++ b/gcc/ada/prj-proc.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -539,10 +539,12 @@ package body Prj.Proc is The_Term := First_Term; while Present (The_Term) loop The_Current_Term := Current_Term (The_Term, From_Project_Node_Tree); - Current_Term_Kind := - Kind_Of (The_Current_Term, From_Project_Node_Tree); - case Current_Term_Kind is + if The_Current_Term /= Empty_Node then + Current_Term_Kind := + Kind_Of (The_Current_Term, From_Project_Node_Tree); + + case Current_Term_Kind is when N_Literal_String => @@ -578,7 +580,7 @@ package body Prj.Proc is else Shared.String_Elements.Table (Last).Next := String_Element_Table.Last - (Shared.String_Elements); + (Shared.String_Elements); end if; Last := String_Element_Table.Last @@ -586,8 +588,8 @@ package body Prj.Proc is Shared.String_Elements.Table (Last) := (Value => String_Value_Of - (The_Current_Term, - From_Project_Node_Tree), + (The_Current_Term, + From_Project_Node_Tree), Index => Source_Index_Of (The_Current_Term, From_Project_Node_Tree), @@ -743,7 +745,7 @@ package body Prj.Proc is The_Package := The_Project.Decl.Packages; while The_Package /= No_Package and then Shared.Packages.Table (The_Package).Name /= - The_Name + The_Name loop The_Package := Shared.Packages.Table (The_Package).Next; @@ -753,7 +755,7 @@ package body Prj.Proc is (The_Package /= No_Package, "package not found."); elsif Kind_Of (The_Current_Term, From_Project_Node_Tree) = - N_Attribute_Reference + N_Attribute_Reference then The_Package := No_Package; end if; @@ -886,8 +888,8 @@ package body Prj.Proc is else if Expression_Kind_Of - (The_Current_Term, From_Project_Node_Tree) = - List + (The_Current_Term, From_Project_Node_Tree) = + List then The_Variable := (Project => Project, @@ -1047,8 +1049,8 @@ package body Prj.Proc is else Shared.String_Elements.Table (Last).Next := - String_Element_Table.Last - (Shared.String_Elements); + String_Element_Table.Last + (Shared.String_Elements); end if; Last := @@ -1059,8 +1061,8 @@ package body Prj.Proc is (Value => The_Variable.Value, Display_Value => No_Name, Location => Location_Of - (The_Current_Term, - From_Project_Node_Tree), + (The_Current_Term, + From_Project_Node_Tree), Flag => False, Next => Nil_String, Index => 0); @@ -1108,7 +1110,7 @@ package body Prj.Proc is Index => 0); The_List := Shared.String_Elements.Table - (The_List).Next; + (The_List).Next; end loop; end; end case; @@ -1334,10 +1336,10 @@ package body Prj.Proc is String_Element_Table.Increment_Last (Shared.String_Elements); Shared.String_Elements.Table (Last).Next := - String_Element_Table.Last - (Shared.String_Elements); + String_Element_Table.Last + (Shared.String_Elements); Last := String_Element_Table.Last - (Shared.String_Elements); + (Shared.String_Elements); end if; end loop; @@ -1366,7 +1368,8 @@ package body Prj.Proc is "illegal node kind in an expression"); raise Program_Error; - end case; + end case; + end if; The_Term := Next_Term (The_Term, From_Project_Node_Tree); end loop; |