OSDN Git Service

PR c++/18451
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 8 Nov 2009 03:47:36 +0000 (03:47 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 8 Nov 2009 03:47:36 +0000 (03:47 +0000)
commit67484828603f721feb1d9772a53d1288ef676b71
treedd1b28a0105b37143349e8a0082a6894d5afb12c
parent0039974c057b4bebee376df043b44e66d6556916
PR c++/18451
PR c++/40738
* cp-tree.h (cp_decl_specifier_seq): Add any_type_specifiers_p.
* parser.c (cp_parser_single_declaration): Call
cp_parser_parse_and_diagnose_invalid_type_name here, too.
(cp_parser_parameter_declaration): And here.
(cp_parser_parse_and_diagnose_invalid_type_name): Be
less picky about declarator form.  Don't skip to
the end of the block if we're in a declarator.
(cp_parser_decl_specifier_seq): Set any_type_specifiers_p.
(cp_parser_simple_declaration): Check it.
(cp_parser_member_declaration): Likewise.
(cp_parser_diagnose_invalid_type_name): Tweak error message.
(cp_parser_expression_statement): Likewise.
* decl2.c (grokfield): Mention decltype instead of typeof.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154006 138bc75d-0d04-0410-961f-82ee72b054a4
27 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
gcc/testsuite/g++.dg/ext/typedef-init.C
gcc/testsuite/g++.dg/lookup/hidden-class1.C
gcc/testsuite/g++.dg/lookup/hidden-class10.C
gcc/testsuite/g++.dg/lookup/hidden-class5.C
gcc/testsuite/g++.dg/lookup/hidden-class7.C
gcc/testsuite/g++.dg/lookup/hidden-temp-class1.C
gcc/testsuite/g++.dg/lookup/hidden-temp-class4.C
gcc/testsuite/g++.dg/lookup/hidden-temp-class7.C
gcc/testsuite/g++.dg/lookup/strong-using-2.C
gcc/testsuite/g++.dg/other/typedef1.C
gcc/testsuite/g++.dg/parse/access10.C
gcc/testsuite/g++.dg/parse/constructor1.C
gcc/testsuite/g++.dg/parse/crash38.C
gcc/testsuite/g++.dg/parse/error3.C
gcc/testsuite/g++.dg/parse/error36.C
gcc/testsuite/g++.dg/parse/typespec1.C
gcc/testsuite/g++.dg/template/typedef5.C
gcc/testsuite/g++.old-deja/g++.pt/typename3.C
gcc/testsuite/g++.old-deja/g++.pt/typename4.C
gcc/testsuite/g++.old-deja/g++.pt/typename6.C
gcc/testsuite/g++.old-deja/g++.robertl/eb94.C