OSDN Git Service

cp:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Sep 2004 17:38:18 +0000 (17:38 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 6 Sep 2004 17:38:18 +0000 (17:38 +0000)
commit637fdc50bd3029c843d6b08c00321528328cf74c
tree076d3a2ac346783bfed885fdb4b84add325e5754
parent5db10a84a345a3c60657113e51a21b0ff4f7c295
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
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/enum2.C