summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C
blob: 489930211e4224ac735a1d753161775a033e7a77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR c/19978 : Test for duplicated warnings (unary operators).  */
/* { dg-do compile } */
/* { dg-options "-Woverflow" } */

#include <limits.h>

int 
g (void)
{
  return - - - - -INT_MIN; /* { dg-bogus "integer overflow in expression.*integer overflow in expression" } */
  /* { dg-warning "integer overflow in expression" "" { target *-*-* } 10 } */
}