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