1 /* { dg-do compile } */
2 /* { dg-prune-output "expected" } */
5 extern void bar (int, char *);
7 #define F __FILE__ /* { dg-error "11:passing argument" } */
8 #define T __TIME__ /* { dg-error "11:passing argument" } */
9 #define D __DATE__ /* { dg-error "11:passing argument" } */
10 #define L __LINE__ /* { dg-error "11:passing argument" } */
12 #define F2 "foo" /* { dg-error "12:passing argument" } */
13 #define T2 "foo" /* { dg-error "12:passing argument" } */
14 #define D2 "foo" /* { dg-error "12:passing argument" } */
15 #define L2 42 /* { dg-error "12:passing argument" } */
20 foo (__FILE__
); /* { dg-error "8:passing argument" } */
21 foo (__BASE_FILE__
); /* { dg-error "8:passing argument" } */
22 foo (__TIME__
); /* { dg-error "8:passing argument" } */
23 foo (__DATE__
); /* { dg-error "8:passing argument" } */
24 foo (__TIMESTAMP__
); /* { dg-error "8:passing argument" } */
25 bar (1, __LINE__
); /* { dg-error "11:passing argument" } */
26 bar (__COUNTER__
, __COUNTER__
); /* { dg-error "21:passing argument" } */
28 foo (F
); /* { dg-message "8:in expansion of" } */
29 foo (T
); /* { dg-message "8:in expansion of" } */
30 foo (D
); /* { dg-message "8:in expansion of" } */
31 bar (1, L
); /* { dg-message "11:in expansion of" } */
33 foo (F2
); /* { dg-message "8:in expansion of" } */
34 foo (T2
); /* { dg-message "8:in expansion of" } */
35 foo (D2
); /* { dg-message "8:in expansion of" } */
36 bar (1, L2
); /* { dg-message "11:in expansion of" } */