1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-25 13:29:41 +00:00

added test related to issue #1263

This commit is contained in:
mrdudz 2020-09-23 23:51:24 +02:00
parent 81ac28ff71
commit 99121688f8
2 changed files with 23 additions and 0 deletions

View File

@ -94,6 +94,12 @@ $(WORKDIR)/pptest2.$1.$2.prg: pptest2.c | $(WORKDIR)
$(if $(QUIET),echo misc/pptest2.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
# should compile, but gives an error
$(WORKDIR)/bug1263.$1.$2.prg: pptest2.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/bug1263.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
# should compile, but then hangs in an endless loop
$(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR)
$(if $(QUIET),echo misc/endless.$1.$2.prg)

17
test/misc/bug1263.c Normal file
View File

@ -0,0 +1,17 @@
/* bug #1263 - erroneous error for implicit function declaration */
#include <stdlib.h>
enum E { I };
extern int f(enum E);
int f(e)
enum E e;
{
return 1;
}
int main(void)
{
return f(1) ? EXIT_SUCCESS : EXIT_FAILURE;
}