Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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" }
}