http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / warn / multiple-overflow-warn-2.C
blob863016bfd68fc20421043ed81c418f303a5aeaf3
1 /* PR c/19978 : Test for duplicated warnings (binary operators).  */
2 /* { dg-do compile } */
3 /* { dg-options "-Woverflow" } */
5 #include <limits.h>
7 int 
8 g1 (void)
10   return INT_MAX + 1 - INT_MAX; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
11   /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */