diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-11-12 21:47:13 +0000 |
---|---|---|
committer | Mark Mitchell <mark@codesourcery.com> | 2004-11-12 21:47:13 +0000 |
commit | 3a90071bf5816c055c4df335ede48769743654be (patch) | |
tree | 46dcc9f50bdc840f6ed40ce6cee0a869920f4236 /gcc/cp/decl.c | |
parent | 7e15f669dee349c6c5fec0846684d1d9df2ac320 (diff) |
PR c++/18389
* decl.c (start_decl): Make sure to set *pop_scope_p. Return
error_mark_node to indicate errors.
PR c++/18429
* parser.c (cp_parser_direct_declarator): Disallow non-constant
array bounds when not inside a function.
PR c++/18436
* pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
unqualified name resolves to a member function.
PR c++/18407
* pt.c (tsubst_copy_and_build): Handle qualified names used from a
derived class correctly.
* decl2.c (import_export_decl): Fix typo in comment.
* tree.c (pod_type_p): Likewise.
PR c++/18389
* g++.dg/parse/cond1.C: New test.
PR c++/18429
* g++.dg/template/array9.C: New test.
* g++.dg/ext/vla1.C: Adjust error messages.
* g++.dg/ext/vlm1.C: Likewise.
* g++.dg/template/crash2.C: Likewise.
PR c++/18436
* g++.dg/template/call3.C: New test.
PR c++/18407
* g++.dg/template/ptrmem11.C: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@90545 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index a6961215396..472b1f92e87 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3670,6 +3670,8 @@ start_decl (const cp_declarator *declarator, tree type, tem; tree context; + *pop_scope_p = false; + /* This should only be done once on the top most decl. */ if (have_extern_spec) { @@ -3690,19 +3692,17 @@ start_decl (const cp_declarator *declarator, deprecated_state = DEPRECATED_NORMAL; if (decl == NULL_TREE || TREE_CODE (decl) == VOID_TYPE) - return NULL_TREE; + return error_mark_node; type = TREE_TYPE (decl); if (type == error_mark_node) - return NULL_TREE; + return error_mark_node; context = DECL_CONTEXT (decl); if (context) *pop_scope_p = push_scope (context); - else - *pop_scope_p = false; /* We are only interested in class contexts, later. */ if (context && TREE_CODE (context) == NAMESPACE_DECL) |