Merge pull request #1817 from acqn/PPFix

[cc65] More preprocessor fixes
This commit is contained in:
Bob Andrews
2022-08-19 21:37:16 +02:00
committed by GitHub
16 changed files with 785 additions and 307 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;
}

13
test/val/bug1643.h Normal file
View File

@@ -0,0 +1,13 @@
/* bug #1643, macro expansion in #include */
#define STDIO_H <stdio.h>
#include STDIO_H
#ifdef string
#undef string
#endif
#define string 0!%^&*/_=
#include <string.h>
#define BUG1643_RESULT 0