add test related to bug#2515 / pr#2518
This commit is contained in:
@@ -102,6 +102,14 @@ $(WORKDIR)/bug1265.$1.$2.prg: bug1265.c | $(WORKDIR)
|
|||||||
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
|
||||||
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
|
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
|
||||||
|
|
||||||
|
# should not compile, but gives different diagnostics in C99 mode than in others
|
||||||
|
$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c | $(WORKDIR)
|
||||||
|
$(if $(QUIET),echo misc/bug2515.$1.$2.prg)
|
||||||
|
$(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out
|
||||||
|
$(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.c99.ref
|
||||||
|
$(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out
|
||||||
|
$(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.ref
|
||||||
|
|
||||||
# this one requires -Werror
|
# this one requires -Werror
|
||||||
$(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
|
$(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
|
||||||
$(if $(QUIET),echo misc/bug1768.$1.$2.prg)
|
$(if $(QUIET),echo misc/bug1768.$1.$2.prg)
|
||||||
|
|||||||
4
test/misc/bug2515.c
Normal file
4
test/misc/bug2515.c
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
#line 13"x"
|
||||||
|
#define X"y"
|
||||||
|
int main() { foo; }
|
||||||
2
test/misc/bug2515.c99.ref
Normal file
2
test/misc/bug2515.c99.ref
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
x:13: Warning: ISO C99 requires whitespace after the macro name
|
||||||
|
x:14: Error: Undeclared identifier 'foo'
|
||||||
1
test/misc/bug2515.ref
Normal file
1
test/misc/bug2515.ref
Normal file
@@ -0,0 +1 @@
|
|||||||
|
x:14: Error: Undeclared identifier 'foo'
|
||||||
Reference in New Issue
Block a user