aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-12-30 16:29:14 +0100
committerTristan Gingold <tgingold@free.fr>2014-12-30 16:29:14 +0100
commitdfff5cae5a4b336ba0cf797f4122cfcace474736 (patch)
treec7fdd9b39a7f2034e499c647213392355da617a4
parent3210520154d762d41aba458b31e68b66f0da235a (diff)
downloadghdl-dfff5cae5a4b336ba0cf797f4122cfcace474736.tar.gz
ghdl-dfff5cae5a4b336ba0cf797f4122cfcace474736.tar.bz2
ghdl-dfff5cae5a4b336ba0cf797f4122cfcace474736.zip
Improve error recovery.
-rw-r--r--src/vhdl/sem_expr.adb2
-rw-r--r--src/vhdl/sem_specs.adb3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb
index af59a3ae3..0813a2efb 100644
--- a/src/vhdl/sem_expr.adb
+++ b/src/vhdl/sem_expr.adb
@@ -674,7 +674,7 @@ package body Sem_Expr is
Sem_Name (Expr);
end if;
Res := Name_To_Range (Expr);
- if Res = Error_Mark then
+ if Is_Error (Res) then
return Null_Iir;
end if;
diff --git a/src/vhdl/sem_specs.adb b/src/vhdl/sem_specs.adb
index 80fc5abf4..d2ace1580 100644
--- a/src/vhdl/sem_specs.adb
+++ b/src/vhdl/sem_specs.adb
@@ -748,7 +748,8 @@ package body Sem_Specs is
null;
end case;
else
- Set_Expression (Spec, Error_Mark);
+ Set_Expression
+ (Spec, Create_Error_Expr (Get_Expression (Spec), Get_Type (Attr)));
end if;
-- LRM 5.1