summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/skip-1.C
blob: 027c405d4625b2ac314cc1dbb23b5c76c859a0e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile }
// { dg-options "-Wall" }

// Check that we don't warn about code that will not be executed.
extern int f2(int);
void
f1(int i)
{
  f2(1 == 1 ? 0 : f2(i >> -10));
  f2(1 == 1 ? 0 : f2(i >> 128));
  f2(1 == 1 ? 0 : f2(i << -10));
  f2(1 == 1 ? 0 : f2(1 << 128));
  f2(1 != 1 ? f2(i >> -10) : 0);
  f2(1 != 1 ? f2(i >> 128) : 0);
  f2(1 != 1 ? f2(i << -10) : 0);
  f2(1 != 1 ? f2(1 << 128) : 0);
}