From 0a541e746c71fe21eb72bae61a9ead541ed7e98d Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 23 Dec 2020 17:06:39 -0500 Subject: [PATCH] c++: Improve testcase [PR98332] gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-overflow3.C: Use INT_MAX. --- gcc/testsuite/g++.dg/cpp0x/constexpr-overflow3.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.30.2