Preprocessor directives can now appear in the argument list of function-like macro calls.

#pragma PP-tokens can now be macro replaced.
#include header names directly enclosed in <> are free of macro replacement.
Preprocess-only mode (-E) now outputs with #line as source info.
Moved testcases for #760 and #1357.
Added testcase for #1643.
This commit is contained in:
acqn
2022-07-26 21:10:38 +08:00
parent 80fc8cd11e
commit 2f357ba9b2
9 changed files with 420 additions and 144 deletions

12
test/val/bug1643.c Normal file
View File

@@ -0,0 +1,12 @@
/* bug #1643, macro expansion in #include */
#define MKSTR(a) MKSTR_IMPL(a)
#define MKSTR_IMPL(a) #a
#define BUG1643_H bug1643.h
#include MKSTR(BUG1643_H)
int main(void)
{
return BUG1643_RESULT;
}