decl.c (build_enumerator): Use add_double and int_fits_type_p instead of cp_build_bin...
authorZack Weinberg <zack@gcc.gnu.org>
Mon, 6 Sep 2004 17:38:18 +0000 (17:38 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Mon, 6 Sep 2004 17:38:18 +0000 (17:38 +0000)
commitff4eb0b5ff4c7607e1ff7e0be67f4a0c09caa326
tree076d3a2ac346783bfed885fdb4b84add325e5754
parent8a57cd3d5e63ab1e0ec1127ec548d535993b71c4
decl.c (build_enumerator): Use add_double and int_fits_type_p instead of cp_build_binary_op...

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.

From-SVN: r87121
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/enum2.C