mirror of
https://github.com/frida/tinycc
synced 2024-11-28 10:33:07 +03:00
824dcebe59
This requires one more change in how macro arguments are expanded: the standard requires that macro args are expanded before substituting into the replacement list. This implies expanding them only once even when they occur multiple times in the list. TCC expanded them repeatedly in that case. Without __COUNTER__ that's harmless. So, simply always expand arguments (when used without # and ##) once and store the resulting tokens.
16 lines
245 B
Plaintext
16 lines
245 B
Plaintext
X1 0
|
|
X2 1
|
|
X3 3
|
|
X4 x 4 y
|
|
X5 x 5 y 6
|
|
X6 b 7
|
|
X7 8 9
|
|
X8 x 10 y x 10 y 11 x2 x 10 y 12 y2 13
|
|
X9 x 14 y 15 x 14 y 15 16 x2 x 14 y 15 17 y2 18
|
|
X10 19 19 20 x2 19 21 y2 22
|
|
X11 23 23 24 x2 23 25 y2 26
|
|
X12 "__COUNTER__"
|
|
X13 x27
|
|
X14 x__COUNTER__
|
|
X15 x2828
|