c++: Improve testcase [PR98332]
authorJason Merrill <jason@redhat.com>
Wed, 23 Dec 2020 22:06:39 +0000 (17:06 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 23 Dec 2020 22:08:05 +0000 (17:08 -0500)
gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/constexpr-overflow3.C: Use INT_MAX.

gcc/testsuite/g++.dg/cpp0x/constexpr-overflow3.C

index 22d4c59..6176625 100644 (file)
@@ -1,5 +1,7 @@
 // PR c++/98332
 // { dg-do compile { target c++11 } }
 
-struct S { int a = 2147483647 + 1; }; // { dg-warning "overflow" }
+#include <limits.h>
+
+struct S { int a = INT_MAX + 1; }; // { dg-warning "overflow" }
 struct { S b[2][1][1][1]; } c;