diff options
| author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-17 09:39:20 +0000 |
|---|---|---|
| committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-17 09:39:20 +0000 |
| commit | 413b44a530df8598de8f2232b8ee986d80decef6 (patch) | |
| tree | bafb1d4d752bc8cd9d7107e10b013aa0a6bc1171 | |
| parent | a9df57b981fa17f9730ca5e8daef4d9515ed403a (diff) | |
| download | ppe42-gcc-413b44a530df8598de8f2232b8ee986d80decef6.tar.gz ppe42-gcc-413b44a530df8598de8f2232b8ee986d80decef6.zip | |
* decl2.c (handle_class_head): Always push some scope even
in the error case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36467 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/cp/decl2.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 66e39759b8e..b0781e2deec 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-09-17 Geoffrey Keating <geoffk@cygnus.com> + + * decl2.c (handle_class_head): Always push some scope even + in the error case. + 2000-09-16 Mark Mitchell <mark@codesourcery.com> * cp-tree.h (struct cp_language_function): Remove diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b579f5976f8..a530c3284ee 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -5461,9 +5461,10 @@ handle_class_head (aggr, scope, id) /* According to the suggested resolution of core issue 180, 'typename' is assumed after a class-key. */ decl = make_typename_type (scope, id, 1); - if (decl == error_mark_node) - return error_mark_node; - decl = TYPE_MAIN_DECL (decl); + if (decl != error_mark_node) + decl = TYPE_MAIN_DECL (decl); + else + decl = NULL_TREE; } else if (scope == current) { @@ -5479,7 +5480,7 @@ handle_class_head (aggr, scope, id) cp_error ("no file-scope type named `%D'", id); /* Inject it at the current scope. */ - if (!decl) + if (! decl) decl = TYPE_MAIN_DECL (xref_tag (aggr, id, 1)); } |

