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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index be1addd..991996b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3514,7 +3514,8 @@ check_tag_decl (cp_decl_specifier_seq *declspecs)
return NULL_TREE;
}
- if (TYPE_P (declspecs->type)
+ if (declspecs->type
+ && TYPE_P (declspecs->type)
&& ((TREE_CODE (declspecs->type) != TYPENAME_TYPE
&& IS_AGGR_TYPE (declspecs->type))
|| TREE_CODE (declspecs->type) == ENUMERAL_TYPE))