1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00

Merge pull request #391 from greg-king5/yaccdbg-fix

Fix the "yaccdbg.c" compiler regression test.
This commit is contained in:
Oliver Schmidt 2017-03-02 09:45:44 +01:00 committed by GitHub
commit ca3e5e8b8c
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,3 @@
# makefile for the regression tests that generate output which has to be
# compared with reference output
@ -24,7 +23,7 @@ WORKDIR := ..$S..$Stestwrk
DIFF := $(WORKDIR)/bdiff
CC := gcc
CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow
CFLAGS := -O2 -Wall -W -Wextra -funsigned-char -fwrapv -fno-strict-overflow
.PHONY: all clean
@ -34,6 +33,11 @@ TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c=
all: $(REFS) $(TESTS)
# "yaccdbg.c" includes "yacc.c".
# yaccdbg's built files must depend on both of them.
$(WORKDIR)/yaccdbg.ref: yacc.c
$(WORKDIR)/%.ref: %.c
$(CC) $(CFLAGS) $< -o $(WORKDIR)/$*.host
$(WORKDIR)$S$*.host > $@
@ -48,6 +52,8 @@ $(WORKDIR)/switch.%rg: CC65FLAGS += -Wc --all-cdecl
$(WORKDIR)/yacc.%rg: CC65FLAGS += -Wc --all-cdecl
$(WORKDIR)/yaccdbg%prg: CC65FLAGS += -Wc --all-cdecl
$(WORKDIR)/yaccdbg%prg: yacc.c
$(WORKDIR)/%.prg: %.c $(WORKDIR)/%.ref
$(CL65) $(CC65FLAGS) $< -o $@
$(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out

View File

@ -562,7 +562,7 @@ yylook()
}
# ifdef LEXDEBUG
if((*(lsp-1)-yysvec-1)<0)
if (*(lsp-1) < yysvec + 1)
{
fprintf(yyout,"yylook: stopped (end)\n");
}