diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-01 01:01:34 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-01 01:01:34 +0000 |
commit | 640aa28c350fee76a59e94625a2270ffee308dae (patch) | |
tree | cfa0b1e39e621b716ae38190c9b764f2198c23ed /libstdc++-v3 | |
parent | e02a4f0d15b6131904cef5078d55354a81bc0ffd (diff) | |
download | gcc-640aa28c350fee76a59e94625a2270ffee308dae.tar.gz |
* 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
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/std/std_limits.h | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c3c526d0dc5..f875fa4ab3a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2005-01-31 Mark Mitchell <mark@codesourcery.com> + + * 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. + 2005-01-31 Paolo Carlini <pcarlini@suse.de> Gabriel Dos Reis <gdr@integrable-solutions.net> diff --git a/libstdc++-v3/include/std/std_limits.h b/libstdc++-v3/include/std/std_limits.h index 9bc99e1a4e9..6927de1ccb4 100644 --- a/libstdc++-v3/include/std/std_limits.h +++ b/libstdc++-v3/include/std/std_limits.h @@ -1007,7 +1007,7 @@ namespace std static const bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm - = __FLT_DENORM_MIN__ ? denorm_present : denorm_absent; + = bool(__FLT_DENORM_MIN__) ? denorm_present : denorm_absent; static const bool has_denorm_loss = __glibcxx_float_has_denorm_loss; static float infinity() throw() @@ -1064,7 +1064,7 @@ namespace std static const bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm - = __DBL_DENORM_MIN__ ? denorm_present : denorm_absent; + = bool(__DBL_DENORM_MIN__) ? denorm_present : denorm_absent; static const bool has_denorm_loss = __glibcxx_double_has_denorm_loss; static double infinity() throw() @@ -1121,7 +1121,7 @@ namespace std static const bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__; static const bool has_signaling_NaN = has_quiet_NaN; static const float_denorm_style has_denorm - = __LDBL_DENORM_MIN__ ? denorm_present : denorm_absent; + = bool(__LDBL_DENORM_MIN__) ? denorm_present : denorm_absent; static const bool has_denorm_loss = __glibcxx_long_double_has_denorm_loss; |