expressions: make assign_expression() take an op argument
[smatch.git] / validation / preprocessor / preprocessor3.c
blobe9f6ae7200519206488fe0cb5870dd31b7187ba4
1 /*
2 * Each iteration of the scanning of "SCAN()" re-evaluates the recursive
3 * B->A->B expansion.
5 * Did I already mention that the C preprocessor language
6 * is a perverse thing?
7 */
9 #define LP (
11 #define A() B LP )
12 #define B() A LP )
14 #define SCAN(x) x
16 A() // B ( )
17 SCAN( A() ) // A ( )
18 SCAN(SCAN( A() )) // B ( )
19 SCAN(SCAN(SCAN( A() ))) // A ( )
21 * check-name: Preprocessor #3
22 * check-description: Sparse used to get this wrong, outputting A third, not B.
23 * check-command: sparse -E $file
25 * check-output-start
27 B ( )
28 A ( )
29 B ( )
30 A ( )
31 * check-output-end