cp:
* decl.c (build_enumerator): Use add_double and int_fits_type_p instead of cp_build_binary_op, to avoid creating short-lived trees. * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token lookahead instead of backtracking. Move some code to avoid a conditional branch. (cp_parser_enum_specifier): Avoid duplication of effort with caller. Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. (cp_parser_enumerator_list, cp_parser_enumerator_definition): Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate. testsuite: * g++.old-deja/g++.other/enum2.C: Move dg-error markers to reflect changed line numbering of diagnostics. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87121 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
- gcc/cp/ChangeLog 17 additions, 5 deletionsgcc/cp/ChangeLog
- gcc/cp/decl.c 15 additions, 8 deletionsgcc/cp/decl.c
- gcc/cp/parser.c 49 additions, 46 deletionsgcc/cp/parser.c
- gcc/testsuite/ChangeLog 17 additions, 12 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.old-deja/g++.other/enum2.C 5 additions, 5 deletionsgcc/testsuite/g++.old-deja/g++.other/enum2.C
Loading
Please register or sign in to comment