diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cf9a42c9f8a..a62a61e565c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-12-27 Mark Mitchell <mark@codesourcery.com> + + PR c++/19149 + * decl.c (check_tag_decl): Robustify. + 2004-12-23 Mark Mitchell <mark@codesourcery.com> PR c++/17595 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index be1adddb862..991996bc3f5 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)) |