ada: Add Check_Error_Detected before "raise Bad_Attribute"
We shouldn't raise Bad_Attribute if there is no error. This patch adds a call to Check_Error_Detected to make sure that's true. (There are other cases where we raise Bad_Attribute; this patch doesn't try to fix them all.) gcc/ada/ * sem_attr.adb (Analyze_Attribute): Add a call to Check_Error_Detected.
This commit is contained in:
parent
0f7d8f2f66
commit
b4509d1960
1 changed files with 1 additions and 0 deletions
|
@ -3299,6 +3299,7 @@ package body Sem_Attr is
|
|||
-- Check for missing/bad expression (result of previous error)
|
||||
|
||||
if No (E1) or else Etype (E1) = Any_Type then
|
||||
Check_Error_Detected;
|
||||
raise Bad_Attribute;
|
||||
end if;
|
||||
end if;
|
||||
|
|
Loading…
Add table
Reference in a new issue