equiv: call_extra_mod_hooks() inside set_equiv()
[smatch.git] / validation / preprocessor / preprocessor8.c
blob524825c1c4cf95b1e9b94dd944ffbf3a43106658
1 #define A(x) ## x
2 #define B(x) x ##
3 #define C(x) x ## ## ##
4 #define D(x) x#y
5 #define E x#y
6 #define F(x,y) x x##y #x y
7 #define G a##b
8 #define H 1##2
9 #define I(x,y,z) x y z
10 "A(x)" : A(x)
11 "B(x)" : B(x)
12 "C(x)" : C(x)
13 "D(x)" : D(x)
14 "x#y" : E
15 "ab GH \"G\" 12" : F(G,H)
16 "a ## b" : I(a,##,b)
18 * check-name: Preprocessor #8
19 * check-command: sparse -E $file
21 * check-output-start
23 "A(x)" : A(x)
24 "B(x)" : B(x)
25 "C(x)" : C(x)
26 "D(x)" : D(x)
27 "x#y" : x#y
28 "ab GH \"G\" 12" : ab GH "G" 12
29 "a ## b" : a ## b
30 * check-output-end
32 * check-error-start
33 preprocessor/preprocessor8.c:1:14: error: '##' cannot appear at the ends of macro expansion
34 preprocessor/preprocessor8.c:2:16: error: '##' cannot appear at the ends of macro expansion
35 preprocessor/preprocessor8.c:3:22: error: '##' cannot appear at the ends of macro expansion
36 preprocessor/preprocessor8.c:4:15: error: '#' is not followed by a macro parameter
37 * check-error-end