Commit 457b6274 by Robert Dewar Committed by Geert Bosch

sem_attr.adb (Analyze_Attribute): Defend against bad Val attribute.

	* sem_attr.adb (Analyze_Attribute): Defend against bad Val attribute.
	Fixes compilation abandoned bomb in B24009B.

From-SVN: r47683
parent 19349925
2001-12-05 Robert Dewar <dewar@gnat.com>
* sem_attr.adb (Analyze_Attribute): Defend against bad Val attribute.
Fixes compilation abandoned bomb in B24009B.
2001-12-05 Ed Schonberg <schonber@gnat.com>
* sem_ch12.adb:
......
......@@ -1476,7 +1476,9 @@ package body Sem_Attr is
E1 := First (Exprs);
Analyze (E1);
if Etype (E1) = Any_Type then
-- Check for missing or bad expression (result of previous error)
if No (E1) or else Etype (E1) = Any_Type then
raise Bad_Attribute;
end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment