Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
warn-ovl2.C
blob: 6b5dff880237999f5880f9e2573fcaeb7fc85bef [
file
] [
log
] [
blame
]
// { dg-do compile { target c++11 } }
// { dg-options "-O2 -Woverflow" }
#include
<climits>
constexpr
int
f
()
{
return
INT_MAX
;
}
int
main
()
{
return
f
()
+
2
;
// { dg-warning "overflow" }
}