diff options
author | Ori Bernstein <ori@eigenstate.org> | 2020-03-17 22:03:25 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-03-17 22:03:25 -0700 |
commit | 37b86df09ff381bcc4f60802d43e57bd9bfcac73 (patch) | |
tree | 76065637ec0ea0d646ec783c00a156f9702968c7 /amd64/include/ape/stdarg.h | |
parent | 52dc943702a8f7815546e76286b153c3813e1db0 (diff) | |
download | plan9front-37b86df09ff381bcc4f60802d43e57bd9bfcac73.tar.xz |
Improve the posix preprocessor.
This fixes token pasting, making it expand when
it should expand, and paste before expansion when
it should paste before expanding.
#define CAT(a, b) a ## b
#define BAR 3
#define FOO CAT(BAR, 3)
FOO
now produces 33, while
#define CAT(a, b) a ## b
#define EOF (-1)
#define NOP(x) x
NOP(CAT(foo, EOF))
CAT(,EOF)
CAT(,)
produces
fooEOF
(-1)
<empty>
respectively.
Diffstat (limited to 'amd64/include/ape/stdarg.h')
0 files changed, 0 insertions, 0 deletions