2 // { dg-options "-Wnonnull" }
5 #define B(n) A(n##0), A(n##1), A(n##2), A(n##3), A(n##4), A(n##5), A(n##6), A(n##7)
6 #define C(n) B(n##0), B(n##1), B(n##2), B(n##3), B(n##4), B(n##5), B(n##6), B(n##7)
7 #define D C(0), C(1), C(2), C(3)
9 void foo (D) __attribute__((nonnull ( // { dg-message "in a call to function '\[^\n\r]*' declared 'nonnull'" }
10 #embed __FILE__ limit (128)
12 #if __cplusplus >= 201103L
14 #embed __FILE__ limit (128)
15 )]] void bar (D); // { dg-message "in a call to function '\[^\n\r]*' declared 'nonnull'" "" { target c++11 } }
17 void bar (D) __attribute__((nonnull ( // { dg-message "in a call to function '\[^\n\r]*' declared 'nonnull'" "" { target c++98_only } }
18 #embed __FILE__ limit (128)
23 #if __cplusplus >= 201103L
32 foo (D); // { dg-warning "argument \[0-9]\+ null where non-null expected" }
33 bar (D); // { dg-warning "argument \[0-9]\+ null where non-null expected" }