Merge pull request #1817 from acqn/PPFix
[cc65] More preprocessor fixes
This commit is contained in:
12
test/val/bug1643.c
Normal file
12
test/val/bug1643.c
Normal 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
13
test/val/bug1643.h
Normal 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
|
||||
Reference in New Issue
Block a user