diff --git a/test/misc/Makefile b/test/misc/Makefile index b17c69f5c..c8b130ec4 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -106,6 +106,12 @@ $(WORKDIR)/bug1263.$1.$2.prg: bug1263.c | $(WORKDIR) $(if $(QUIET),echo misc/bug1263.$1.$2.prg) $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) +# should compile, but gives an error +$(WORKDIR)/bug1357.$1.$2.prg: bug1357.c | $(WORKDIR) + @echo "FIXME: " $$@ "currently does not compile." + $(if $(QUIET),echo misc/bug1357.$1.$2.prg) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + # this one requires --std=c89, it fails with --std=c99 $(WORKDIR)/bug1265.$1.$2.prg: bug1265.c | $(WORKDIR) $(if $(QUIET),echo misc/bug1265.$1.$2.prg) diff --git a/test/misc/bug1357.c b/test/misc/bug1357.c new file mode 100644 index 000000000..40415f868 --- /dev/null +++ b/test/misc/bug1357.c @@ -0,0 +1,30 @@ + +/* issue #1357 - X Macros don't work with C preprocessor */ + +#define OPCODES(X) \ + X(PUSHNIL) \ + X(PUSHTRUE) \ + X(PUSHFALSE) + +enum { +#define X(op) op, +OPCODES(X) +#undef X + N_OPS +}; + +/* cc65 -E bug1357.c -o bug1357.c.pre + should produce something like this: + +enum { +PUSHNIL, +PUSHTRUE, +PUSHFALSE, + N_OPS +}; +*/ + +int main(void) +{ + return 0; +}