From 761a78cecf4e8d3810a7557204f9e324a08eb795 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Mon, 3 Jul 2006 21:06:08 +0000 Subject: [PATCH] * support/regression/valdiag/tests/switch.c, * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4 * support/regression/tests/libmullong.c: fixed for host * support/regression/ports/host/spec.mk: disable all warnings for host, SDCC runs with --less-pedantic too git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4262 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 8 ++++++++ support/regression/ports/host/spec.mk | 6 +++++- support/regression/tests/libmullong.c | 7 +++++++ support/valdiag/tests/constantRange.c | 16 ++++++++-------- support/valdiag/tests/switch.c | 5 +++-- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index a11d400d..60e2bc8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-07-03 Bernhard Held + + * support/regression/valdiag/tests/switch.c, + * support/regression/valdiag/tests/constantRange.c: adapted to gcc 4 + * support/regression/tests/libmullong.c: fixed for host + * support/regression/ports/host/spec.mk: disable all warnings for host, + SDCC runs with --less-pedantic too + 2006-07-03 Borut Razem * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in: diff --git a/support/regression/ports/host/spec.mk b/support/regression/ports/host/spec.mk index ab3f89f4..8112dd46 100644 --- a/support/regression/ports/host/spec.mk +++ b/support/regression/ports/host/spec.mk @@ -1,6 +1,10 @@ # Port specification for compiling on the host machines version of gcc SDCC = $(shell ( sh -c "gcc --version" 2>&1 ) > /dev/null && echo gcc || echo cc) -SDCCFLAGS = -DPORT_HOST=1 -Wall -fsigned-char -fpack-struct -DREENTRANT= -I$(top_builddir) -I$(top_srcdir) +SDCCFLAGS = -DPORT_HOST=1 -fsigned-char -fpack-struct -DREENTRANT= -I$(top_builddir) -I$(top_srcdir) +# disable all warnings: +SDCCFLAGS+= -w +# enable all warnings: +#SDCCFLAGS+= -Wall EXEEXT = .bin OBJEXT = .o diff --git a/support/regression/tests/libmullong.c b/support/regression/tests/libmullong.c index 2445c4f3..4ab6ee75 100644 --- a/support/regression/tests/libmullong.c +++ b/support/regression/tests/libmullong.c @@ -28,6 +28,13 @@ */ #if defined(PORT_HOST) +#define TYPE_TARGET_CHAR TYPE_BYTE +#define TYPE_TARGET_INT TYPE_WORD +#define TYPE_TARGET_LONG TYPE_DWORD +#define TYPE_TARGET_UCHAR TYPE_UBYTE +#define TYPE_TARGET_UINT TYPE_UWORD +#define TYPE_TARGET_ULONG TYPE_UDWORD + #if defined(type_c) && !defined(WORDS_BIGENDIAN) struct { diff --git a/support/valdiag/tests/constantRange.c b/support/valdiag/tests/constantRange.c index 9253aefd..620b2e66 100644 --- a/support/valdiag/tests/constantRange.c +++ b/support/valdiag/tests/constantRange.c @@ -222,25 +222,25 @@ void foo(void) unsigned ub3:3; } str; - str.sb1 = -2; /* WARNING(SDCC) */ + str.sb1 = -2; /* WARNING */ str.sb1 = -1; str.sb1 = 1; - str.sb1 = 2; /* WARNING(SDCC) */ + str.sb1 = 2; /* WARNING */ - str.ub1 = -2; /* WARNING(SDCC) */ + str.ub1 = -2; /* WARNING */ str.ub1 = -1; str.ub1 = 1; - str.ub1 = 2; /* WARNING(SDCC) */ + str.ub1 = 2; /* WARNING */ - str.sb3 = -5; /* WARNING(SDCC) */ + str.sb3 = -5; /* WARNING */ str.sb3 = -4; str.sb3 = 7; - str.sb3 = 8; /* WARNING(SDCC) */ + str.sb3 = 8; /* WARNING */ - str.ub3 = -5; /* WARNING(SDCC) */ + str.ub3 = -5; /* WARNING */ str.ub3 = -4; str.ub3 = 7; - str.ub3 = 8; /* WARNING(SDCC) */ + str.ub3 = 8; /* WARNING */ ASSERT (! (-2 == str.sb1)); /* WARNING */ ASSERT ( (-1 == str.sb1)); diff --git a/support/valdiag/tests/switch.c b/support/valdiag/tests/switch.c index 6a29a9d8..81a71454 100644 --- a/support/valdiag/tests/switch.c +++ b/support/valdiag/tests/switch.c @@ -69,7 +69,7 @@ char foo(void) switch(x) { char y; - x++; /* WARNING */ + x++; /* WARNING(SDCC) */ case 0: return 0; @@ -88,7 +88,7 @@ char foo(void) { switch(x) { - char y=1; /* WARNING */ + char y=1; /* WARNING(SDCC) */ case 0: return 0; @@ -133,6 +133,7 @@ char foo(void) y = x; return x; } + return 0; } #endif -- 2.30.2