aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-11-08 15:17:42 -0500
committerJason Merrill <jason@gcc.gnu.org>2010-11-08 15:17:42 -0500
commit9e115cec97350099177071bb16b3efcbbacc9445 (patch)
tree29e021e2fec06d40962f55e47d182c721d950eae /libstdc++-v3
parent1b2c3293fbe12f7fa3254af12e9d0ca98d89c5aa (diff)
downloadgcc-9e115cec97350099177071bb16b3efcbbacc9445.zip
gcc-9e115cec97350099177071bb16b3efcbbacc9445.tar.gz
gcc-9e115cec97350099177071bb16b3efcbbacc9445.tar.bz2
Correct conversion/overflow behavior.
* cvt.c (ignore_overflows): Move here from typeck.c. (ocp_convert): Use it. (cp_fold_convert): Use it. Don't call rvalue. * typeck.c (build_static_cast_1): Don't use it. Do call rvalue. * error.c (location_of): Handle expressions, too. * class.c (check_bitfield_decl): Set input_location around call to cxx_constant_value. * semantics.c (cxx_eval_outermost_constant_expr): Don't print the expression if it already had TREE_OVERFLOW set. (reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too. (verify_constant): Allow overflow with a permerror if we're enforcing. (cxx_eval_outermost_constant_expr): Use verify_constant. (adjust_temp_type): Use cp_fold_convert. * decl.c (build_enumerator): Don't call constant_expression_warning. * decl2.c (grokbitfield): Likewise. From-SVN: r166453
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4a5d630..d49f970 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-08 Jason Merrill <jason@redhat.com>
+
+ * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust
+ expected error.
+
2010-11-08 Benjamin Kosnik <bkoz@redhat.com>
* include/std/complex (operator==, !=): Mark constexpr.
diff --git a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
index fa4c85e..e7f448d 100644
--- a/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc
@@ -52,6 +52,6 @@ test04()
// { dg-error "denominator cannot be zero" "" { target *-*-* } 153 }
// { dg-error "out of range" "" { target *-*-* } 154 }
// { dg-error "non-constant expression" "" { target *-*-* } 59 }
-// { dg-error "is not a constant expression" "" { target *-*-* } 59 }
+// { dg-error "overflow in constant expression" "" { target *-*-* } 59 }
// { dg-error "not a member" "" { target *-*-* } 162 }
// { dg-error "not a valid template argument" "" { target *-*-* } 164 }