2014-08-04 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstrict-overflow-24.c
blob05e8dd144844de9cab50db1b5218c1a7a795bc25
1 /* { dg-do compile } */
2 /* { dg-options "-fstrict-overflow -O2" } */
3 /* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
4 #pragma GCC diagnostic error "-Wstrict-overflow"
6 int
7 foo (int i)
9 return __builtin_abs (i) >= 0; /* { dg-error "assuming signed overflow does not occur" "correct warning" } */