Allowed old-style (K and R) function declarations to be fastcall.

That lets them match old-style definitions.  It avoids "Type conflict" error messages.  It allows shorter function calls.

Fixed the types of some variables in "test/ref/otccex.c".  It avoids crashes on 64-bit Windows (32-bit Windows with 64-bit pointers).
This commit is contained in:
Greg King
2019-07-22 09:05:01 -04:00
parent cceffbdb8c
commit a0db846a97
7 changed files with 66 additions and 75 deletions

View File

@@ -44,16 +44,6 @@ all: $(TESTS)
$(WORKDIR):
$(call MKDIR,$(WORKDIR))
# Some files have "K & R"-style syntax. Therefore, some forward
# function-declarations don't match the later 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)/cq4.%.prg \
$(WORKDIR)/cq71.%.prg \
$(WORKDIR)/cq81.%.prg \
$(WORKDIR)/cq84.%.prg: CC65FLAGS += -Wc --all-cdecl
define PRG_template
$(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR)