PR c++/6709 (DR 743)
commit34429675140b34e3d1c9f4ccb1021d15cb92edb5
authorJason Merrill <jason@redhat.com>
Wed, 20 Jul 2011 14:21:05 +0000 (20 10:21 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 20 Jul 2011 14:21:05 +0000 (20 10:21 -0400)
tree9e56cc48852c32e97103a681ceb85db78262ad17
parentff3ac0f47166f4ef3c6a22623bfadba6e419dbb1
PR c++/6709 (DR 743)

PR c++/6709 (DR 743)
PR c++/42603 (DR 950)
gcc/cp/
* parser.c (token_is_decltype, cp_lexer_next_token_is_decltype): New.
(cp_parser_nested_name_specifier_opt): Allow decltype.
(cp_parser_qualifying_entity): Likewise.
(cp_parser_decltype): Replace source tokens with CPP_DECLTYPE.
(cp_parser_simple_type_specifier): Handle decltype as scope.
(cp_parser_base_specifier): Allow decltype.
(cp_parser_base_clause): Don't crash on null base.
* parser.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move to c-common.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
gcc/c-family/
* c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
(CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
(CPP_DECLTYPE): New.
* c-common.c (c_parse_error): Handle CPP_DECLTYPE.

From-SVN: r176513
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/parser.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/decltype21.C [new file with mode: 0644]