From 2bd0daabbe1fc40e65e4a4631e68f5ca093ea1fb Mon Sep 17 00:00:00 2001 From: grischka Date: Mon, 6 Jan 2014 19:56:26 +0100 Subject: misc. fixes - tccgen: error out for cast to void, as in void foo(void) { return 1; } This avoids an assertion failure in x86_64-gen.c, also. also fix tests2/03_struct.c accordingly - Error: "memory full" - be more specific - Makefiles: remove circular dependencies, lookup tcctest.c from VPATH - tcc.h: cleanup lib, include, crt and libgcc search paths" avoid duplication or trailing slashes with no CONFIG_MULTIARCHDIR (as from 9382d6f1a0e2d0104a82ed805207d9e742c6b068) - tcc.h: remove ";{B}" from PE search path in ce5e12c2f950052d8109b6b7a56d900547705c08 James Lyon wrote: "... I'm not sure this is the right way to fix this problem." And the answer is: No, please. (copying libtcc1.a for tests instead) - win32/build_tcc.bat: do not move away a versioned file --- tests/Makefile | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 08dfa42..b958a48 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -27,7 +27,7 @@ ifneq ($(ARCH),i386) TESTS := $(filter-out btest,$(TESTS)) endif ifdef CONFIG_WIN32 - TESTS := $(filter-out test3,$(TESTS)) + TESTS := w32-prep $(filter-out test3,$(TESTS)) endif ifeq ($(TARGETOS),Darwin) TESTS := $(filter-out hello-exe test3 btest,$(TESTS)) @@ -84,6 +84,9 @@ moretests: @echo ------------ $@ ------------ $(MAKE) -C tests2 +w32-prep: + cp ../libtcc1.a ../lib + # test.ref - generate using gcc # copy only tcclib.h so GCC's stddef and stdarg will be used test.ref: tcctest.c @@ -91,41 +94,41 @@ test.ref: tcctest.c ./tcctest.gcc > $@ # auto test -test1: test.ref +test1: tcctest.c test.ref @echo ------------ $@ ------------ - $(TCC) -run $(SRCDIR)/tcctest.c > test.out1 + $(TCC) -run $< > test.out1 @if diff -u test.ref test.out1 ; then echo "Auto Test OK"; fi # iterated test2 (compile tcc then compile tcctest.c !) -test2: test.ref +test2: tcctest.c test.ref @echo ------------ $@ ------------ - $(TCC) $(RUN_TCC) $(RUN_TCC) -run $(SRCDIR)/tcctest.c > test.out2 + $(TCC) $(RUN_TCC) $(RUN_TCC) -run $< > test.out2 @if diff -u test.ref test.out2 ; then echo "Auto Test2 OK"; fi # iterated test3 (compile tcc then compile tcc then compile tcctest.c !) -test3: test.ref +test3: tcctest.c test.ref @echo ------------ $@ ------------ - $(TCC) $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run $(SRCDIR)/tcctest.c > test.out3 + $(TCC) $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run $< > test.out3 @if diff -u test.ref test.out3 ; then echo "Auto Test3 OK"; fi # binary output test -test4: test.ref +test4: tcctest.c test.ref @echo ------------ $@ ------------ # object + link output - $(TCC) -c -o tcctest3.o $(SRCDIR)/tcctest.c + $(TCC) -c -o tcctest3.o $< $(TCC) -o tcctest3 tcctest3.o ./tcctest3 > test3.out @if diff -u test.ref test3.out ; then echo "Object Auto Test OK"; fi # dynamic output - $(TCC) -o tcctest1 $(SRCDIR)/tcctest.c + $(TCC) -o tcctest1 $< ./tcctest1 > test1.out @if diff -u test.ref test1.out ; then echo "Dynamic Auto Test OK"; fi # dynamic output + bound check - $(TCC) -b -o tcctest4 $(SRCDIR)/tcctest.c + $(TCC) -b -o tcctest4 $< ./tcctest4 > test4.out @if diff -u test.ref test4.out ; then echo "BCheck Auto Test OK"; fi # static output - $(TCC) -static -o tcctest2 $(SRCDIR)/tcctest.c + $(TCC) -static -o tcctest2 $< ./tcctest2 > test2.out @if diff -u test.ref test2.out ; then echo "Static Auto Test OK"; fi @@ -161,9 +164,9 @@ speedtest: ex2 ex3 time ./ex3 35 time $(TCC) -run $(top_srcdir)/examples/ex3.c 35 -weaktest: test.ref - $(TCC) -c tcctest.c -o weaktest.tcc.o $(CPPFLAGS) $(CFLAGS) - $(CC) -c tcctest.c -o weaktest.gcc.o -I. $(CPPFLAGS) -w $(CFLAGS) +weaktest: tcctest.c test.ref + $(TCC) -c $< -o weaktest.tcc.o $(CPPFLAGS) $(CFLAGS) + $(CC) -c $< -o weaktest.gcc.o -I. $(CPPFLAGS) -w $(CFLAGS) objdump -t weaktest.tcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.tcc.o.txt objdump -t weaktest.gcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.gcc.o.txt diff weaktest.gcc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK" @@ -220,7 +223,5 @@ cache: tcc_g clean: $(MAKE) -C tests2 $@ rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.gcc *.exe \ - hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h - -Makefile: $(SRCDIR)/Makefile - cp $< $@ + hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \ + ../lib/libtcc1.a -- cgit v1.3.1 From 767410b8750b45d63805b45ca1a2cf34d7cb4923 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Thu, 9 Jan 2014 17:15:08 +0800 Subject: Various Makefile fixes for cross-compilation - Build libtcc1 for cross-compiler on arm (arm to X cross compilers) - Install libtcc1 and includes for arm to i386 cross compiler - Add basic check of cross-compilers (compile ex1.c) --- Makefile | 9 +++++---- tests/Makefile | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'tests/Makefile') diff --git a/Makefile b/Makefile index df1d198..78e67f7 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,7 @@ else ifeq ($(ARCH),arm) NATIVE_FILES=$(ARM_FILES) PROGS_CROSS=$(I386_CROSS) $(X64_CROSS) $(WIN32_CROSS) $(WIN64_CROSS) $(C67_CROSS) LIBTCC1=libtcc1.a +LIBTCC1_CROSS=lib/i386-win32/libtcc1.a lib/x86_64-win32/libtcc1.a lib/i386/libtcc1.a endif PROGS_CROSS_LINK=$(foreach PROG_CROSS,$(PROGS_CROSS),$($(PROG_CROSS)_LINK)) @@ -278,7 +279,7 @@ endif ifdef CONFIG_CROSS mkdir -p "$(tccdir)/win32/lib/32" mkdir -p "$(tccdir)/win32/lib/64" -ifeq ($(ARCH),x86-64) +ifneq ($(ARCH),i386) mkdir -p "$(tccdir)/i386" $(INSTALL) -m644 lib/i386/libtcc1.a "$(tccdir)/i386" cp -r "$(tccdir)/include" "$(tccdir)/i386" @@ -287,7 +288,7 @@ endif $(INSTALL) -m644 lib/i386-win32/libtcc1.a "$(tccdir)/win32/lib/32" $(INSTALL) -m644 lib/x86_64-win32/libtcc1.a "$(tccdir)/win32/lib/64" cp -r $(top_srcdir)/win32/include/. "$(tccdir)/win32/include" - cp -r $(top_srcdir)/include/. "$(tccdir)/win32/include" + cp -r "$(tccdir)/include" "$(tccdir)/win32" endif uninstall: @@ -300,7 +301,7 @@ uninstall: rm -fv "$(libdir)/libtcc.so*" rm -rf "$(tccdir)/win32" -rmdir $(tccdir)/include -ifeq ($(ARCH),x86-64) +ifneq ($(ARCH),i386) rm -rf "$(tccdir)/i386" endif else @@ -346,7 +347,7 @@ tcc-doc.info: tcc-doc.texi export LIBTCC1 %est: - $(MAKE) -C tests $@ + $(MAKE) -C tests $@ "PROGS_CROSS=$(PROGS_CROSS)" clean: rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF) diff --git a/tests/Makefile b/tests/Makefile index b958a48..62e4f88 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -16,6 +16,9 @@ TESTS = \ abitest \ vla_test-run \ moretests +ifdef CONFIG_CROSS +TESTS += hello-cross +endif # test4 -- problem with -static # asmtest -- minor differences with gcc @@ -50,8 +53,9 @@ endif # run local version of tcc with local libraries and includes TCCFLAGS = -B$(TOP) -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include ifdef CONFIG_WIN32 - TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir) -I$(top_srcdir)/include -I$(TOP) -L$(TOP) + TCCFLAGS = -B$(top_srcdir)/win32 --I$(top_srcdir) -I$(top_srcdir)/include -I$(TOP) -L$(TOP) endif +XTCCFLAGS = -B$(TOP) -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include TCC = $(TOP)/tcc $(TCCFLAGS) RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(top_srcdir)/tcc.c $(TCCFLAGS) @@ -69,6 +73,15 @@ hello-exe: ../examples/ex1.c @echo ------------ $@ ------------ $(TCC) $< -o hello$(EXESUF) || ($(TOP)/tcc -vv; exit 1) && ./hello$(EXESUF) +hello-cross: ../examples/ex1.c + @echo ------------ $@ ------------ + for XTCC in $(PROGS_CROSS) ; \ + do echo -n "Test of $$XTCC... "; \ + out=$$($(TOP)/$$XTCC $(XTCCFLAGS) -c $< 2>&1); \ + test $$? -ne 0 && { echo "Failed\n$$out\n" ; $(TOP)/$$XTCC -vv; exit 1; } ; \ + echo "Success"; \ + done + hello-run: ../examples/ex1.c @echo ------------ $@ ------------ $(TCC) -run $< -- cgit v1.3.1 From 32a4962593d6a2006cdd725480124717e7f5377d Mon Sep 17 00:00:00 2001 From: grischka Date: Tue, 21 Jan 2014 13:25:14 +0100 Subject: tcctest: add back testXb (self compile with -b) - Thanks to Kirill "tcc -b itself" should work now (was removed in d5f4df09ff4a84dda5b03525285f03be7723376b) Also: - tests/Makefile: - fix spurious --I from 767410b8750b45d63805b45ca1a2cf34d7cb4923 - lookup boundtest.c via VPATH (for out-of-tree build) - test[123]b?: fail on diff error - Windows: test3 now works (from e31579b0769e1f9c0947d12e83316d1149307b1a) - abitest: a libtcc.a made by gcc is not usable for tcc on WIndows - using source instead (libtcc.c) - tccpe: - avoid gcc warning (x86_64) --- Makefile | 4 ++-- tccpe.c | 2 +- tests/Makefile | 40 ++++++++++++++++++++++------------------ 3 files changed, 25 insertions(+), 21 deletions(-) (limited to 'tests/Makefile') diff --git a/Makefile b/Makefile index 78e67f7..39f10ba 100644 --- a/Makefile +++ b/Makefile @@ -346,8 +346,8 @@ tcc-doc.info: tcc-doc.texi # in tests subdir export LIBTCC1 -%est: - $(MAKE) -C tests $@ "PROGS_CROSS=$(PROGS_CROSS)" +test test% %test : + $(MAKE) -C tests $@ 'PROGS_CROSS=$(PROGS_CROSS)' clean: rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF) diff --git a/tccpe.c b/tccpe.c index ed7cb82..f4a58f7 100644 --- a/tccpe.c +++ b/tccpe.c @@ -1803,7 +1803,7 @@ static void pe_add_runtime(TCCState *s1, struct pe_info *pe) s1->runtime_main = start_symbol; #endif } else { - pe->start_addr = (DWORD)tcc_get_symbol_err(s1, start_symbol); + pe->start_addr = (DWORD)(uintptr_t)tcc_get_symbol_err(s1, start_symbol); } pe->type = pe_type; diff --git a/tests/Makefile b/tests/Makefile index 62e4f88..4d99a46 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,7 +5,7 @@ TOP = .. include $(TOP)/Makefile SRCDIR = $(top_srcdir)/tests -VPATH = $(SRCDIR) +VPATH = $(SRCDIR) $(top_srcdir) # what tests to run TESTS = \ @@ -13,27 +13,30 @@ TESTS = \ hello-run \ libtest \ test3 \ + $(BTESTS) \ abitest \ vla_test-run \ moretests + +BTESTS = test1b test3b btest + ifdef CONFIG_CROSS -TESTS += hello-cross + TESTS += hello-cross endif # test4 -- problem with -static # asmtest -- minor differences with gcc # btest -- works on i386 (including win32) -# test3 -- win32 does not know how to printf long doubles # bounds-checking is supported only on i386 ifneq ($(ARCH),i386) - TESTS := $(filter-out btest,$(TESTS)) + TESTS := $(filter-out $(BTESTS),$(TESTS)) endif ifdef CONFIG_WIN32 - TESTS := w32-prep $(filter-out test3,$(TESTS)) + TESTS := w32-prep $(filter-out $(BTESTS),$(TESTS)) endif ifeq ($(TARGETOS),Darwin) - TESTS := $(filter-out hello-exe test3 btest,$(TESTS)) + TESTS := $(filter-out hello-exe test3 $(BTESTS),$(TESTS)) endif ifeq ($(ARCH),i386) else ifneq ($(ARCH),x86-64) @@ -53,7 +56,7 @@ endif # run local version of tcc with local libraries and includes TCCFLAGS = -B$(TOP) -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include ifdef CONFIG_WIN32 - TCCFLAGS = -B$(top_srcdir)/win32 --I$(top_srcdir) -I$(top_srcdir)/include -I$(TOP) -L$(TOP) + TCCFLAGS = -B$(top_srcdir)/win32 -I$(top_srcdir) -I$(top_srcdir)/include -I$(TOP) -L$(TOP) endif XTCCFLAGS = -B$(TOP) -B$(top_srcdir)/win32 -I$(TOP) -I$(top_srcdir) -I$(top_srcdir)/include @@ -101,28 +104,29 @@ w32-prep: cp ../libtcc1.a ../lib # test.ref - generate using gcc -# copy only tcclib.h so GCC's stddef and stdarg will be used test.ref: tcctest.c gcc -o tcctest.gcc $< -I$(top_srcdir) $(CPPFLAGS) -w $(CFLAGS) $(NATIVE_DEFINES) -std=gnu99 -O0 -fno-omit-frame-pointer $(LDFLAGS) ./tcctest.gcc > $@ # auto test -test1: tcctest.c test.ref +test1 test1b: tcctest.c test.ref @echo ------------ $@ ------------ $(TCC) -run $< > test.out1 - @if diff -u test.ref test.out1 ; then echo "Auto Test OK"; fi + @diff -u test.ref test.out1 && echo "Auto Test OK" # iterated test2 (compile tcc then compile tcctest.c !) -test2: tcctest.c test.ref +test2 test2b: tcctest.c test.ref @echo ------------ $@ ------------ $(TCC) $(RUN_TCC) $(RUN_TCC) -run $< > test.out2 - @if diff -u test.ref test.out2 ; then echo "Auto Test2 OK"; fi + @diff -u test.ref test.out2 && echo "Auto Test2 OK" # iterated test3 (compile tcc then compile tcc then compile tcctest.c !) -test3: tcctest.c test.ref +test3 test3b: tcctest.c test.ref @echo ------------ $@ ------------ $(TCC) $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run $< > test.out3 - @if diff -u test.ref test.out3 ; then echo "Auto Test3 OK"; fi + @diff -u test.ref test.out3 && echo "Auto Test3 OK" + +test%b : TCCFLAGS += -b # binary output test test4: tcctest.c test.ref @@ -153,7 +157,7 @@ btest: boundtest.c @echo ------------ $@ ------------ @for i in $(BOUNDS_OK); do \ echo ; echo --- boundtest $$i ---; \ - if $(TCC) -b -run boundtest.c $$i ; then \ + if $(TCC) -b -run $< $$i ; then \ echo succeded as expected; \ else\ echo Failed positive test $$i ; exit 1 ; \ @@ -161,7 +165,7 @@ btest: boundtest.c done ;\ for i in $(BOUNDS_FAIL); do \ echo ; echo --- boundtest $$i ---; \ - if $(TCC) -b -run boundtest.c $$i ; then \ + if $(TCC) -b -run $< $$i ; then \ echo Failed negative test $$i ; exit 1 ;\ else\ echo failed as expected; \ @@ -203,8 +207,8 @@ asmtest: asmtest.ref abitest-cc$(EXESUF): abitest.c $(top_builddir)/$(LIBTCC) $(CC) -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(NATIVE_DEFINES) $(LIBS) $(LINK_LIBTCC) $(LDFLAGS) -I$(top_srcdir) -abitest-tcc$(EXESUF): abitest.c $(top_builddir)/$(LIBTCC) - $(TCC) -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(NATIVE_DEFINES) $(LIBS) $(LINK_LIBTCC) $(LDFLAGS) -I$(top_srcdir) +abitest-tcc$(EXESUF): abitest.c libtcc.c + $(TCC) -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(NATIVE_DEFINES) -DONE_SOURCE $(LIBS) $(LDFLAGS) -I$(top_srcdir) abitest: abitest-cc$(EXESUF) abitest-tcc$(EXESUF) @echo ------------ $@ ------------ -- cgit v1.3.1 From d3d89900f6e0a052f2fc15482fca58ce95cb94d1 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sun, 9 Mar 2014 22:54:48 +0800 Subject: Don't hardcode gcc in tests Makefile --- .gitignore | 2 +- tests/Makefile | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/Makefile') diff --git a/.gitignore b/.gitignore index 4ba6761..6e5075f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,7 @@ p2.c tcctest[1234] test[1234].out tests/tcclib.h -tests/tcctest.gcc +tests/tcctest.cc tests/weaktest.*.o.txt tests/tests2/fred.txt tests/hello diff --git a/tests/Makefile b/tests/Makefile index 4d99a46..0cfefca 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -103,10 +103,10 @@ moretests: w32-prep: cp ../libtcc1.a ../lib -# test.ref - generate using gcc +# test.ref - generate using cc test.ref: tcctest.c - gcc -o tcctest.gcc $< -I$(top_srcdir) $(CPPFLAGS) -w $(CFLAGS) $(NATIVE_DEFINES) -std=gnu99 -O0 -fno-omit-frame-pointer $(LDFLAGS) - ./tcctest.gcc > $@ + $(CC) -o tcctest.cc $< -I$(top_srcdir) $(CPPFLAGS) -w $(CFLAGS) $(NATIVE_DEFINES) -std=gnu99 -O0 -fno-omit-frame-pointer $(LDFLAGS) + ./tcctest.cc > $@ # auto test test1 test1b: tcctest.c test.ref @@ -183,10 +183,10 @@ speedtest: ex2 ex3 weaktest: tcctest.c test.ref $(TCC) -c $< -o weaktest.tcc.o $(CPPFLAGS) $(CFLAGS) - $(CC) -c $< -o weaktest.gcc.o -I. $(CPPFLAGS) -w $(CFLAGS) + $(CC) -c $< -o weaktest.cc.o -I. $(CPPFLAGS) -w $(CFLAGS) objdump -t weaktest.tcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.tcc.o.txt - objdump -t weaktest.gcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.gcc.o.txt - diff weaktest.gcc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK" + objdump -t weaktest.cc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.cc.o.txt + diff weaktest.cc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK" ex%: $(top_srcdir)/examples/ex%.c $(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) @@ -239,6 +239,6 @@ cache: tcc_g # clean clean: $(MAKE) -C tests2 $@ - rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.gcc *.exe \ + rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.exe \ hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \ ../lib/libtcc1.a -- cgit v1.3.1 From bed865275db3161375b9b082945323c68c4c5b69 Mon Sep 17 00:00:00 2001 From: mingodad Date: Wed, 26 Mar 2014 14:19:22 +0000 Subject: Add the generated executables ending with "-cc" and "-tcc" to the makefile "clean" --- tests/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 0cfefca..55bf29c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -239,6 +239,7 @@ cache: tcc_g # clean clean: $(MAKE) -C tests2 $@ - rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.exe \ - hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \ - ../lib/libtcc1.a + rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc \ + *-cc *-tcc *.exe \ + hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \ + ../lib/libtcc1.a -- cgit v1.3.1 From 3e9a7e9d69e3adb0e9ed65d11caf415e74458fe9 Mon Sep 17 00:00:00 2001 From: Vincent Lefevre Date: Mon, 7 Apr 2014 13:31:00 +0200 Subject: Corrected spelling mistakes in comments and strings --- arm-gen.c | 4 ++-- c67-gen.c | 4 ++-- i386-asm.c | 2 +- i386-tok.h | 2 +- include/stddef.h | 2 +- lib/bcheck.c | 2 +- tccasm.c | 2 +- tccgen.c | 4 ++-- tests/Makefile | 2 +- tests/tcctest.c | 2 +- tests/tests2/46_grep.c | 10 +++++----- 11 files changed, 18 insertions(+), 18 deletions(-) (limited to 'tests/Makefile') diff --git a/arm-gen.c b/arm-gen.c index a9c05fe..680a490 100644 --- a/arm-gen.c +++ b/arm-gen.c @@ -943,7 +943,7 @@ struct plan { Returns the amount of stack space needed for parameter passing Note: this function allocated an array in plan->pplans with tcc_malloc. It - is the responsability of the caller to free this array once used (ie not + is the responsibility of the caller to free this array once used (ie not before copy_params). */ static int assign_regs(int nb_args, int float_abi, struct plan *plan, int *todo) { @@ -1860,7 +1860,7 @@ void gen_opf(int op) case TOK_UGE: case TOK_ULE: case TOK_UGT: - tcc_error("unsigned comparision on floats?"); + tcc_error("unsigned comparison on floats?"); break; case TOK_LT: op=TOK_Nset; diff --git a/c67-gen.c b/c67-gen.c index 6d9068a..a26dfaa 100644 --- a/c67-gen.c +++ b/c67-gen.c @@ -245,8 +245,8 @@ void gsym(int t) } // these are regs that tcc doesn't really know about, -// but asign them unique values so the mapping routines -// can distinquish them +// but assign them unique values so the mapping routines +// can distinguish them #define C67_A0 105 #define C67_SP 106 diff --git a/i386-asm.c b/i386-asm.c index 8473d06..a524658 100644 --- a/i386-asm.c +++ b/i386-asm.c @@ -1382,7 +1382,7 @@ ST_FUNC void subst_asm_operand(CString *add_str, } } -/* generate prolog and epilog code for asm statment */ +/* generate prolog and epilog code for asm statement */ ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands, int nb_outputs, int is_output, uint8_t *clobber_regs, diff --git a/i386-tok.h b/i386-tok.h index d1e4bf3..6ba865d 100644 --- a/i386-tok.h +++ b/i386-tok.h @@ -191,7 +191,7 @@ DEF_FP(mul) DEF_ASM(fcom) - DEF_ASM(fcom_1) /* non existant op, just to have a regular table */ + DEF_ASM(fcom_1) /* non existent op, just to have a regular table */ DEF_FP1(com) DEF_FP(comp) diff --git a/include/stddef.h b/include/stddef.h index eaf0669..9e43de9 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -31,7 +31,7 @@ void *alloca(size_t size); by __need_wint_t, as otherwise stddef.h isn't allowed to define this type). Note that this must be outside the normal _STDDEF_H guard, so that it works even when we've included the file - already (without requring wint_t). Some other libs define _WINT_T + already (without requiring wint_t). Some other libs define _WINT_T if they've already provided that type, so we can use that as guard. TCC defines __WINT_TYPE__ for us. */ #if defined (__need_wint_t) diff --git a/lib/bcheck.c b/lib/bcheck.c index 968cdf4..76413ad 100644 --- a/lib/bcheck.c +++ b/lib/bcheck.c @@ -635,7 +635,7 @@ int __bound_delete_region(void *p) } /* return the size of the region starting at p, or EMPTY_SIZE if non - existant region. */ + existent region. */ static unsigned long get_region_size(void *p) { unsigned long addr = (unsigned long)p; diff --git a/tccasm.c b/tccasm.c index 9c77960..1c6a65d 100644 --- a/tccasm.c +++ b/tccasm.c @@ -232,7 +232,7 @@ static inline void asm_expr_sum(TCCState *s1, ExprValue *pe) } else { goto cannot_relocate; } - pe->sym = NULL; /* same symbols can be substracted to NULL */ + pe->sym = NULL; /* same symbols can be subtracted to NULL */ } else { cannot_relocate: tcc_error("invalid operation with label"); diff --git a/tccgen.c b/tccgen.c index e6e0fe1..ec92797 100644 --- a/tccgen.c +++ b/tccgen.c @@ -1579,7 +1579,7 @@ static inline int is_integer_btype(int bt) bt == VT_INT || bt == VT_LLONG); } -/* check types for comparison or substraction of pointers */ +/* check types for comparison or subtraction of pointers */ static void check_comparison_pointer_types(SValue *p1, SValue *p2, int op) { CType *type1, *type2, tmp_type1, tmp_type2; @@ -5574,7 +5574,7 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r, if (sym->type.t & VT_EXTERN) { /* if the variable is extern, it was not allocated */ sym->type.t &= ~VT_EXTERN; - /* set array size if it was ommited in extern + /* set array size if it was omitted in extern declaration */ if ((sym->type.t & VT_ARRAY) && sym->type.ref->c < 0 && diff --git a/tests/Makefile b/tests/Makefile index 55bf29c..ee0eafe 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -158,7 +158,7 @@ btest: boundtest.c @for i in $(BOUNDS_OK); do \ echo ; echo --- boundtest $$i ---; \ if $(TCC) -b -run $< $$i ; then \ - echo succeded as expected; \ + echo succeeded as expected; \ else\ echo Failed positive test $$i ; exit 1 ; \ fi ;\ diff --git a/tests/tcctest.c b/tests/tcctest.c index c48c1bc..cc8ffd8 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2254,7 +2254,7 @@ void c99_vla_test(int size1, int size2) printf("%s\n", (sizeof tab1 == size1 * size2 * 2 * sizeof(int)) ? "PASSED" : "FAILED"); tab1_ptr = tab1; tab2_ptr = tab2; - printf("Test C99 VLA 2 (ptrs substract): "); + printf("Test C99 VLA 2 (ptrs subtract): "); printf("%s\n", (tab2 - tab1 == (tab2_ptr - tab1_ptr) / (sizeof(int) * 2)) ? "PASSED" : "FAILED"); printf("Test C99 VLA 3 (ptr add): "); printf("%s\n", &tab1[5][1] == (tab1_ptr + (5 * 2 + 1) * sizeof(int)) ? "PASSED" : "FAILED"); diff --git a/tests/tests2/46_grep.c b/tests/tests2/46_grep.c index 5f52220..27589a4 100644 --- a/tests/tests2/46_grep.c +++ b/tests/tests2/46_grep.c @@ -29,10 +29,10 @@ char *documentation[] = { "grep searches a file for a given pattern. Execute by", " grep [flags] regular_expression file_list\n", - "Flags are single characters preceeded by '-':", + "Flags are single characters preceded by '-':", " -c Only a count of matching lines is printed", " -f Print file name for matching lines switch, see below", - " -n Each line is preceeded by its line number", + " -n Each line is preceded by its line number", " -v Only print non-matching lines\n", "The file_list is a list of files (wildcards are acceptable on RSX modes).", "\nThe file name is normally printed if there is a file given.", @@ -54,10 +54,10 @@ char *patdoc[] = { "':n' \":n\" matches alphanumerics, \": \" matches spaces, tabs, and", "': ' other control characters, such as new-line.", "'*' An expression followed by an asterisk matches zero or more", - " occurrances of that expression: \"fo*\" matches \"f\", \"fo\"", + " occurrences of that expression: \"fo*\" matches \"f\", \"fo\"", " \"foo\", etc.", "'+' An expression followed by a plus sign matches one or more", - " occurrances of that expression: \"fo+\" matches \"fo\", etc.", + " occurrences of that expression: \"fo+\" matches \"fo\", etc.", "'-' An expression followed by a minus sign optionally matches", " the expression.", "'[]' A string enclosed in square brackets matches any character in", @@ -153,7 +153,7 @@ void compile(char *source) o == STAR || o == PLUS || o == MINUS) - badpat("Illegal occurrance op.", source, s); + badpat("Illegal occurrence op.", source, s); store(ENDPAT); store(ENDPAT); spp = pp; /* Save pattern end */ -- cgit v1.3.1 From 469ae3a7e57aba6fd0f53afdf2657d8f1a439928 Mon Sep 17 00:00:00 2001 From: minux Date: Sat, 12 Apr 2014 01:10:58 -0400 Subject: build: ignore and properly clean tests/vla_test --- .gitignore | 1 + tests/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Makefile') diff --git a/.gitignore b/.gitignore index ad56048..348aba7 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ tests/tests2/fred.txt tests/tests2/*.exe tests/hello tests/abitest-*cc +tests/vla_test .gdb_history tcc.1 tcc.pod diff --git a/tests/Makefile b/tests/Makefile index ee0eafe..e3824ba 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -241,5 +241,5 @@ clean: $(MAKE) -C tests2 $@ rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc \ *-cc *-tcc *.exe \ - hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \ + hello libtcc_test vla_test tcctest[1234] ex? tcc_g tcclib.h \ ../lib/libtcc1.a -- cgit v1.3.1