From: michaelh Date: Sat, 1 Sep 2001 23:01:08 +0000 (+0000) Subject: * support/regression/ports/host/spec.mk: Updated to compile with the new... X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c952b788d3bc57479db3a7c5e156185bcfbdf9f3;p=fw%2Fsdcc * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers. * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint$ * device/lib/_mullong.c (_mulslong): Changed to actually return a value :) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1205 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 33e9a38b..47a402a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-09-01 Michael Hope + + * support/regression/ports/host/spec.mk: Updated to compile with the new type specifiers. + + * device/lib/Makefile.in (Z80SOURCES): Removed old _mululong, _mulslong, and unneeded _mulint. + + * device/lib/_mullong.c (_mulslong): Changed to actually return a value :) + 2001-08-30 Paul Stoffregen * added peepholes 223 to 231 to mcs51 port. These improve code when using large model. diff --git a/device/lib/Makefile.in b/device/lib/Makefile.in index cc175882..7b743759 100644 --- a/device/lib/Makefile.in +++ b/device/lib/Makefile.in @@ -74,7 +74,7 @@ Z80SOURCES = _atoi.c \ puts.c gets.c \ assert.c _strcat.c \ _modslong.c _modulong.c \ - _mulslong.c _mululong.c _mulint.c _mullong.c \ + _mullong.c \ _divslong.c _divulong.c Z80OBJECTS = $(Z80SOURCES:%.c=$(PORTDIR)/%.o) diff --git a/device/lib/_mullong.c b/device/lib/_mullong.c index 1bc1f410..de42c9b0 100644 --- a/device/lib/_mullong.c +++ b/device/lib/_mullong.c @@ -536,7 +536,7 @@ _mululong (unsigned long a, unsigned long b) // in future: _mullong long _mulslong (long a, long b) // obsolete { - _mululong (a, b); + return _mululong (a, b); } #endif // _MULLONG_ASM diff --git a/support/regression/fwk/lib/testfwk.c b/support/regression/fwk/lib/testfwk.c index 8ba42960..ed6a6143 100644 --- a/support/regression/fwk/lib/testfwk.c +++ b/support/regression/fwk/lib/testfwk.c @@ -146,4 +146,6 @@ main(void) ); _exitEmu(); + + return 0; } diff --git a/support/regression/ports/host/spec.mk b/support/regression/ports/host/spec.mk index aa8f14cb..583f1ea7 100644 --- a/support/regression/ports/host/spec.mk +++ b/support/regression/ports/host/spec.mk @@ -1,6 +1,6 @@ # Port specification for compiling on the host machines version of gcc SDCC = gcc -SDCCFLAGS = -Wall -fsigned-char +SDCCFLAGS = -Wall -fsigned-char -DREENTRANT= -DGENERIC= EXEEXT = .bin diff --git a/support/regression/ports/host/support.c b/support/regression/ports/host/support.c index 756a6235..c98d4896 100644 --- a/support/regression/ports/host/support.c +++ b/support/regression/ports/host/support.c @@ -6,3 +6,8 @@ void _putchar(char c) { putchar(c); } + +void _exitEmu(void) +{ + exit(0); +} diff --git a/support/regression/tests/bug-453196.c b/support/regression/tests/bug-453196.c index 47a84902..3b246995 100644 --- a/support/regression/tests/bug-453196.c +++ b/support/regression/tests/bug-453196.c @@ -69,4 +69,6 @@ Enumeration Func_1 (Capital_Letter Ch_1_Par_Val, Capital_Letter Ch_2_Par_Val) { UNUSED(Ch_1_Par_Val); UNUSED(Ch_2_Par_Val); + + return 0; } diff --git a/support/regression/tests/muldiv.c b/support/regression/tests/muldiv.c index 36e3ef11..474afd35 100644 --- a/support/regression/tests/muldiv.c +++ b/support/regression/tests/muldiv.c @@ -51,19 +51,17 @@ testMul(void) i = 5; - LOG(("i*5 == 25 = %u\n", (int)i*5)); + LOG(("i*5 == 25 = %u\n", (int)(i*5))); result = i*5; ASSERT(result == 25); - LOG(("i*-4 == -20 = %u\n", (int)i*-4)); + LOG(("i*-4 == -20 = %u\n", (int)(i*-4))); ASSERT(i*-4 == -20); i = -10; - LOG(("i*12 == -120 = %u\n", (int)i*12)); + LOG(("i*12 == -120 = %u\n", (int)(i*12))); ASSERT(i*12 == -120); - LOG(("i*-3 == 30 = %u\n", (int)i*-3)); + LOG(("i*-3 == 30 = %u\n", (int)(i*-3))); ASSERT(i*-3 == 30); - - LOG(("30 == %u\n", (int)i*-3)); } void diff --git a/support/regression/tests/staticinit.c b/support/regression/tests/staticinit.c index c9532b55..e244d497 100644 --- a/support/regression/tests/staticinit.c +++ b/support/regression/tests/staticinit.c @@ -64,6 +64,9 @@ testSmallSparseZero(void) ASSERT(smallSparseZero[6] == 0); ASSERT(smallSparseZero[7] == 0); ASSERT(smallSparseZero[8] == 0); + + // Make the compiler happy + ASSERT(smallSparseZeroTail[0] == 1); } #ifdef __mcs51