* decl.c (build_enumerator): Do not issue duplicate error messages
about invalid enumeration constants. * parser.c (cp_parser_non_integral_constant_expression): Always set parser->non_integral_constant_expression_p. (cp_parser_primary_expression): Add cast_p parameter. Issue errors about invalid uses of floating-point literals in cast-expressions. (cp_parser_postfix_expression): Add cast_p parameter. (cp_parser_open_square_expression): Pass it. (cp_parser_parenthesized_expression_list): Add cast_p parameter. (cp_parser_unary_expression): Likewise. (cp_parser_new_placement): Pass it. (cp_parser_direct_new_declarator): Likewise. (cp_parser_new_initializer): Likewise. (cp_parser_cast_expression): Add cast_p parameter. (cp_parser_binary_expression): Likewise. (cp_parser_question_colon_clause): Likewise. (cp_parser_assignment_expression): Likewise. (cp_parser_expression): Likewise. (cp_parser_constant_expression): If an integral constant expression is invalid, return error_mark_node. (cp_parser_expression_statement): Pass cast_p. (cp_parser_condition): Likewise. (cp_parser_iteration_statement): Likewise. (cp_parser_jump_statement): Likewise. (cp_parser_mem_initializer): Likewise. (cp_parser_template_argument): Likewise. (cp_parser_parameter_declaration): Likewise. (cp_parser_initializer): Likewise. (cp_parser_throw_expression): Likewise. (cp_parser_attribute_list): Likewise. (cp_parser_simple_cast_expression): Likewise. (cp_parser_functional_cast): Likewise. (cp_parser_late_parsing_default_args): Likewise. (cp_parser_sizeof_operand): Save/restore non_integral_constant_expression_p. * include/std/std_limits.h (numeric_limits<float>::has_denorm): Add required cast. (numeric_limits<double>::has_denorm): Likewise. (numeric_limits<long double>::has_denorm): Likewise. * g++.dg/other/warning1.C: Adjust error messags. * g++.dg/parse/constant5.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94512 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
- gcc/cp/ChangeLog 39 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/decl.c 5 additions, 0 deletionsgcc/cp/decl.c
- gcc/cp/parser.c 148 additions, 62 deletionsgcc/cp/parser.c
- gcc/testsuite/ChangeLog 5 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.dg/other/warning1.C 2 additions, 2 deletionsgcc/testsuite/g++.dg/other/warning1.C
- gcc/testsuite/g++.dg/parse/constant5.C 14 additions, 0 deletionsgcc/testsuite/g++.dg/parse/constant5.C
- libstdc++-v3/ChangeLog 7 additions, 0 deletionslibstdc++-v3/ChangeLog
- libstdc++-v3/include/std/std_limits.h 3 additions, 3 deletionslibstdc++-v3/include/std/std_limits.h
Loading
Please register or sign in to comment