diff options
author | Mark Mitchell <mark@codesourcery.com> | 2004-06-10 14:26:23 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-06-10 14:26:23 +0000 |
commit | 109e00403a6044810028032054543fc8dcfeed3a (patch) | |
tree | b0a15b965ae2b596d373e44dc59125e68f178fe4 /gcc/cp/parser.c | |
parent | 9655d83b750bc6de0074b0501044d4bcb28679d9 (diff) | |
download | gcc-109e00403a6044810028032054543fc8dcfeed3a.zip gcc-109e00403a6044810028032054543fc8dcfeed3a.tar.gz gcc-109e00403a6044810028032054543fc8dcfeed3a.tar.bz2 |
re PR c++/15227 (Trouble with invalid function definition)
PR c++/15227
* parser.c (cp_parser_direct_declarator): Robustify.
PR c++/15877
* pt.c (tsubst_copy): Use decl_constant_value on enumeration
constants in non-dependent contexts.
PR c++/14211
PR c++/15076
* typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
necessary.
PR c++/14211
* g++.dg/conversion/const1.C: New test.
PR c++/15076
* g++.dg/conversion/reinterpret1.C: New test.
PR c++/15877
* g++.dg/template/enum2.C: New test.
PR c++/15227
* g++.dg/template/error13.C: New test.
From-SVN: r82917
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a90dabd..17242ba 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10726,8 +10726,10 @@ cp_parser_direct_declarator (cp_parser* parser, type = resolve_typename_type (scope, /*only_current_p=*/false); /* If that failed, the declarator is invalid. */ - if (type != error_mark_node) - scope = type; + if (type == error_mark_node) + error ("`%T::%D' is not a type", + TYPE_CONTEXT (scope), + TYPE_IDENTIFIER (scope)); /* Build a new DECLARATOR. */ declarator = build_nt (SCOPE_REF, scope, |