]>
Commit | Line | Data |
---|---|---|
1dbdb756 PP |
1 | // PR c++/60765 |
2 | // { dg-options "-Wall -Wunused-parameter" } | |
3 | ||
4 | struct foo | |
5 | { | |
6 | } x; | |
7 | ||
8 | void (foo::*g) (int *) __attribute__ ((nonnull (2))); | |
9 | ||
10 | void | |
11 | fun1 (void (foo::*f) (int *) __attribute__ ((nonnull (2)))) | |
12 | { | |
75ff24e1 | 13 | (x.*f) ((int *) 0); // { dg-warning "argument 1 null" } |
1dbdb756 PP |
14 | } |
15 | ||
16 | void | |
17 | fun2 (void (foo::*f) () __attribute__ ((nonnull, unused))) // { dg-bogus "unused" } | |
18 | { | |
75ff24e1 | 19 | (x.*g) ((int *) 0); // { dg-warning "argument 1 null" } |
1dbdb756 | 20 | } |