summaryrefslogtreecommitdiffstats
path: root/gcc/cp
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-27 19:03:16 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-27 19:03:16 +0000
commit345b2a3907b1972677ba3091684d23a482ec9e40 (patch)
treec995eeab2f10532b3a098e972471d797c0bf2f02 /gcc/cp
parent73dbfddf2d786bbe60ec57c9509901c8ad9543ba (diff)
downloadppe42-gcc-345b2a3907b1972677ba3091684d23a482ec9e40.tar.gz
ppe42-gcc-345b2a3907b1972677ba3091684d23a482ec9e40.zip
PR c++/19149
* decl.c (check_tag_decl): Robustify. PR c++/19149 * g++.dg/parse/error23.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92648 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c3
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))
OpenPOWER on IntegriCloud