diff options
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 -- |