summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/warn/nonnull2.C
blob: 10515a47405d634c06aad4bf4cf0b1fccd3ab081 (plain)
1
2
3
4
5
6
7
8
9
10
// PR c++/60764
// { dg-options "-Wall" }

struct foo
{
  foo () __attribute__ ((nonnull (1)));
};

const foo &x = foo (); // { dg-bogus "null argument" }
foo y = foo (); // { dg-bogus "null argument" }