aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/Wnonnull2.C
blob: 6757437de126a669f25a5d3d362a2a3f8a9115e2 (plain)
1
2
3
4
5
6
7
8
9
// PR c++/68767
// { dg-options "-Wnonnull" }

extern int len (const char*) __attribute__ ((__nonnull__ (1)));

int f (int x)
{
  return len ((x ? "x" : 0) ? (x ? "x" : 0) : "x");
}