mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 22:30:12 +00:00
Changed the compiler test-suite to work with the fastcall-default version of cc65.
This commit is contained in:
parent
8743e9911d
commit
b24c87e61f
@ -126,7 +126,7 @@ mymain(int argc,char **argv)
|
|||||||
} else {
|
} else {
|
||||||
/* why not using a function pointer ? */
|
/* why not using a function pointer ? */
|
||||||
f = &fact;
|
f = &fact;
|
||||||
print_num((*(long (*)())f)(n), base);
|
print_num((*(long (*)(int))f)(n), base);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -26,6 +26,13 @@ TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=
|
|||||||
|
|
||||||
all: $(TESTS)
|
all: $(TESTS)
|
||||||
|
|
||||||
|
# cq71.c and cq84.c have "K & R"-style syntax. And, some local forward
|
||||||
|
# function-declarations don't match the later global function definitions.
|
||||||
|
# Those programs fail when fastcall is used; but, the cdecl calling convention
|
||||||
|
# tolerates those conflicts. Therefore, make their functions default to cdecl.
|
||||||
|
#
|
||||||
|
$(WORKDIR)/cq71%prg $(WORKDIR)/cq84%prg: CC65FLAGS += -Wc --all-cdecl
|
||||||
|
|
||||||
$(WORKDIR)/%.prg: %.c
|
$(WORKDIR)/%.prg: %.c
|
||||||
$(CL65) $(CC65FLAGS) $< -o $@
|
$(CL65) $(CC65FLAGS) $< -o $@
|
||||||
$(SIM65) $(SIM65FLAGS) $@
|
$(SIM65) $(SIM65FLAGS) $@
|
||||||
|
Loading…
Reference in New Issue
Block a user