Rebase.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / attrib49.C
blob99c6154f1a55b785fb74164d1455ff562786b314
1 // PR c++/60765
2 // { dg-options "-Wall -Wunused-parameter" }
4 struct foo
6 } x;
8 void (foo::*g) (int *) __attribute__ ((nonnull (2)));
10 void
11 fun1 (void (foo::*f) (int *) __attribute__ ((nonnull (2))))
13     (x.*f) ((int *) 0); // { dg-warning "null argument" }
16 void
17 fun2 (void (foo::*f) () __attribute__ ((nonnull, unused))) // { dg-bogus "unused" }
19     (x.*g) ((int *) 0); // { dg-warning "null argument" }