diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2005-03-22 14:44:10 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2005-03-22 14:44:10 +0000 |
commit | 0f3744f8c2816d6f681b7b93784c634e1f8f34c2 (patch) | |
tree | a50341df48b44bde39d1b745df0eecf43c77b358 /gcc/cp | |
parent | b2a6a2fb642ff3deaf4ac102ebca75e96ed9d1e9 (diff) | |
download | gcc-0f3744f8c2816d6f681b7b93784c634e1f8f34c2.zip gcc-0f3744f8c2816d6f681b7b93784c634e1f8f34c2.tar.gz gcc-0f3744f8c2816d6f681b7b93784c634e1f8f34c2.tar.bz2 |
re PR c++/20499 (ICE on duplicate class definition)
PR c++/20499
* parser.c (cp_parser_class_head): Return NULL_TREE when
encountering a redefinition.
* g++.dg/parse/error16.C: Tweak error markers.
From-SVN: r96870
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ddac9f8..bb0c547 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR c++/20499 + * parser.c (cp_parser_class_head): Return NULL_TREE when + encountering a redefinition. + 2005-03-22 Nathan Sidwell <nathan@codesourcery.com> PR c++/20465 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 6df7bad..a614540 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -12858,7 +12858,8 @@ cp_parser_class_head (cp_parser* parser, { error ("redefinition of %q#T", type); cp_error_at ("previous definition of %q#T", type); - type = error_mark_node; + type = NULL_TREE; + goto done; } /* We will have entered the scope containing the class; the names of |