aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 2431877..ef61d17 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3640,14 +3640,12 @@ start_decl (const cp_declarator *declarator,
deprecated_state = DEPRECATED_NORMAL;
- if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE)
+ if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE
+ || decl == error_mark_node)
return error_mark_node;
type = TREE_TYPE (decl);
- if (type == error_mark_node)
- return error_mark_node;
-
context = DECL_CONTEXT (decl);
if (context)