diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-20 16:02:55 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-20 16:02:55 +0000 |
commit | d58952aefb03632bbb5b441d5c0bd330711f0af1 (patch) | |
tree | d046e56bfbd6a40106ae6ab96fafc954f1dfc955 /gcc/ada/sem_attr.adb | |
parent | 648f8fc59b2cc39abd24f4c22388b346cdebcc31 (diff) | |
parent | 50221fae802a10fafe95e61d40504a58da33e98f (diff) | |
download | gcc-d58952aefb03632bbb5b441d5c0bd330711f0af1.tar.gz |
Merge trunk into svelinaro-dev/sve
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 5aef17df8ec..cc4e39c50d8 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -231,10 +231,10 @@ package body Sem_Attr is E1 : Node_Id; E2 : Node_Id; - P_Type : Entity_Id; + P_Type : Entity_Id := Empty; -- Type of prefix after analysis - P_Base_Type : Entity_Id; + P_Base_Type : Entity_Id := Empty; -- Base type of prefix after analysis ----------------------- @@ -419,7 +419,7 @@ package body Sem_Attr is -- required error messages. procedure Error_Attr_P (Msg : String); - pragma No_Return (Error_Attr); + pragma No_Return (Error_Attr_P); -- Like Error_Attr, but error is posted at the start of the prefix procedure Legal_Formal_Attribute; @@ -446,7 +446,9 @@ package body Sem_Attr is -- node in the aspect case). procedure Unexpected_Argument (En : Node_Id); - -- Signal unexpected attribute argument (En is the argument) + pragma No_Return (Unexpected_Argument); + -- Signal unexpected attribute argument (En is the argument), and then + -- raises Bad_Attribute to avoid any further semantic processing. procedure Validate_Non_Static_Attribute_Function_Call; -- Called when processing an attribute that is a function call to a @@ -1108,8 +1110,10 @@ package body Sem_Attr is -- node Nod is within enclosing node Encl_Nod. procedure Placement_Error; + pragma No_Return (Placement_Error); -- Emit a general error when the attributes does not appear in a - -- postcondition-like aspect or pragma. + -- postcondition-like aspect or pragma, and then raises Bad_Attribute + -- to avoid any further semantic processing. ------------------------------ -- Check_Placement_In_Check -- |