PR c++/6709 (DR 743)
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Jul 2011 14:21:05 +0000 (14:21 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Jul 2011 14:21:05 +0000 (14:21 +0000)
commit07b8f133cc53a86b5e01a50697cc7d14fd8d96b8
tree9e56cc48852c32e97103a681ceb85db78262ad17
parent6c59dfa445b9ed8b839dd7bfc85db3d6a5a10f8f
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176513 138bc75d-0d04-0410-961f-82ee72b054a4
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]