testcase for issue #1357
This commit is contained in:
parent
0db23a8951
commit
adda9438d2
2 changed files with 36 additions and 0 deletions
|
@ -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)
|
||||
|
|
30
test/misc/bug1357.c
Normal file
30
test/misc/bug1357.c
Normal file
|
@ -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;
|
||||
}
|
Loading…
Add table
Reference in a new issue