re PR c/61405 (Not emitting "enumeration value not handled in switch" warning for bit-field enums)
PR c/61405 PR c/53874 gcc/ * asan.c (maybe_instrument_call): Add default case. * ipa-pure-const.c (special_builtin_state): Likewise. * predict.c (expr_expected_value_1): Likewise. * lto-streamer-out.c (write_symbol): Initialize variable. gcc/c-family/ * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD. gcc/c/ * c-parser.c: Don't define CPP_KEYWORD. (c_parser_switch_statement): Pass original type to c_finish_case. * c-tree.h (c_finish_case): Update declaration. * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it conditionally to c_do_switch_warnings. gcc/cp/ * semantics.c (finish_switch_cond): Call unlowered_expr_type. * tree.c (bot_manip): Add default case. * parser.c (cp_parser_primary_expression): Cast the controlling expression of a switch to an int. (cp_parser_unqualified_id): Likewise. gcc/testsuite/ * c-c++-common/pr53874.c: New test. * c-c++-common/pr61405.c: New test. libcpp/ * include/cpplib.h (enum cpp_ttype): Define CPP_KEYWORD. From-SVN: r215559
This commit is contained in:
parent
dc9c1b91e6
commit
083e891e69
20 changed files with 136 additions and 17 deletions
|
@ -153,6 +153,9 @@ enum cpp_ttype
|
|||
TTYPE_TABLE
|
||||
N_TTYPES,
|
||||
|
||||
/* A token type for keywords, as opposed to ordinary identifiers. */
|
||||
CPP_KEYWORD,
|
||||
|
||||
/* Positions in the table. */
|
||||
CPP_LAST_EQ = CPP_LSHIFT,
|
||||
CPP_FIRST_DIGRAPH = CPP_HASH,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue