summaryrefslogtreecommitdiff
path: root/sys/src/cmd/cpp/cpp.h
AgeCommit message (Collapse)Author
2023-03-25cpp: correct #pragma once uniqueness checkJacob Moody
2023-03-21cpp: #pragma once supportJacob Moody
2020-07-13cpp: fix mutually recursive macrosOri Bernstein
Handle cases where parameterless macros expand to each other: #define FOO BAR #define BAR FOO FOO There were cases where the macros didn't make it into the hidesets, and we would recurse infinitely. This fixes that.
2020-04-19Make priority array max size explicit.Ori Bernstein
we were implicitly depending on UMINUS being the last entry in the operator table -- that's fragile.
2020-03-23evaluate #if expressions using vlongOri Bernstein
#if expressions are expected to be evaluated using intmax_t, according to the C99 spec, 6.10.1 p3. On plan9, intmax_t maps to vlong.
2020-03-17Improve the posix preprocessor.Ori Bernstein
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.
2019-06-18Always turn on the -+ flag in cppOri Bernstein
C99 comments have been the default in compilers for something like 20 years now. This means we don't need to remember to turn it on when porting software, and gets rid of cryptic errors about unterminated character constants when someone writes something like: // Didn't need to... We still accept the flag to avoid breaking mkfiles, but we do nothing with it. This also removes the documentation, since the option does nothing now.
2015-09-24cpp: fix memory corruption due to input buffer relocationcinap_lenrek
the dynamic input buffer resize code (fillbuf()) is broken as the calling code assumes that memory wont relocate. instead of trying to work out all the cases where this happens, i'm getting rid of fillbuf() and just read the whole file into memory in setsource(). the bug could be reproduced with something as simple as: @{for(i in `{seq 1 10000}){echo $i ', \'; }} | cpp
2011-12-03cpp: raise macro argument count to 64 (sic) for freetypecinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen