From: Jason Merrill Date: Wed, 23 Dec 2020 22:06:39 +0000 (-0500) Subject: c++: Improve testcase [PR98332] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a541e746c71fe21eb72bae61a9ead541ed7e98d;p=gcc.git c++: Improve testcase [PR98332] gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-overflow3.C: Use INT_MAX. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow3.C index 22d4c59f4f8..61766257e39 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow3.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow3.C @@ -1,5 +1,7 @@ // PR c++/98332 // { dg-do compile { target c++11 } } -struct S { int a = 2147483647 + 1; }; // { dg-warning "overflow" } +#include + +struct S { int a = INT_MAX + 1; }; // { dg-warning "overflow" } struct { S b[2][1][1][1]; } c;