1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-18 00:07:21 +00:00

Added some names to the list of test-suite programs that need the --all-cdecl work-around.

Added a work-around for a cc65 bug that made the yacc tests fail.
This commit is contained in:
Greg King 2015-06-25 13:57:17 -04:00
parent 8bdbc00ba3
commit f6d1234576
3 changed files with 19 additions and 4 deletions

View File

@ -36,6 +36,20 @@ $(WORKDIR)/%.ref: %.c
$(CC) $(CFLAGS) $< -o $(WORKDIR)/$*.host
$(WORKDIR)/$*.host > $@
# 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)/init%prg: CC65FLAGS += -Wc --all-cdecl
$(WORKDIR)/switch.%rg: CC65FLAGS += -Wc --all-cdecl
# Also, yacc.c does some things that fail when stack operations are optimized.
# Therefore, don't optimize them.
#
$(WORKDIR)/yacc.%rg: CC65FLAGS += -Wc --all-cdecl,--disable-opt,OptStackOps
$(WORKDIR)/yaccdbg%prg: CC65FLAGS += -Wc --all-cdecl,--disable-opt,OptStackOps
$(WORKDIR)/%.prg: %.c $(WORKDIR)/%.ref
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out

View File

@ -26,12 +26,12 @@ TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=
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.
# 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)/cq71%prg $(WORKDIR)/cq84%prg: CC65FLAGS += -Wc --all-cdecl
$(WORKDIR)/cq4%prg $(WORKDIR)/cq71.%rg $(WORKDIR)/cq81%prg $(WORKDIR)/cq84%prg: CC65FLAGS += -Wc --all-cdecl
$(WORKDIR)/%.prg: %.c
$(CL65) $(CC65FLAGS) $< -o $@

View File

@ -5,7 +5,8 @@
*/
#include <stdio.h>
#include <limits.h>
#define NO_IMPLICIT_FUNCPTR_CONV
unsigned char success=0;
unsigned char failures=0;