From 2249071bac7c3195525b3a0d9cd5e48ba368de8f Mon Sep 17 00:00:00 2001 From: borutr Date: Tue, 23 May 2006 18:59:28 +0000 Subject: [PATCH] * src/regression/Makefile: removed bool2.c test, added -q linker option * src/regression/add2.c, src/regression/add3.c, src/regression/bool1.c, src/regression/bool3.c, src/regression/nestfor.c, src/regression/ptrfunc.c, src/regression/compare.c, src/regression/or1.c, src/regression/compare2.c, src/regression/while.c, src/regression/compare3.c, src/regression/compare4.c, src/regression/compare5.c, src/regression/sub2.c, src/regression/rotate1.c, src/regression/rotate2.c, src/regression/rotate3.c, src/regression/rotate4.c, src/regression/switch1.c, src/regression/rotate5.c, src/regression/for.c, src/regression/add.c, src/regression/sub.c, src/regression/call1.c: define SUPPORT_BIT_TYPES 0, removed unused bit variables git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4187 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/regression/Makefile | 4 ++-- src/regression/add.c | 2 +- src/regression/add2.c | 2 +- src/regression/add3.c | 2 +- src/regression/bool1.c | 1 - src/regression/bool3.c | 2 -- src/regression/call1.c | 1 - src/regression/compare.c | 3 --- src/regression/compare2.c | 1 - src/regression/compare3.c | 1 - src/regression/compare4.c | 1 - src/regression/compare5.c | 1 - src/regression/for.c | 1 - src/regression/nestfor.c | 1 - src/regression/or1.c | 11 ++++++++++- src/regression/ptrfunc.c | 1 - src/regression/rotate1.c | 1 - src/regression/rotate2.c | 1 - src/regression/rotate3.c | 1 - src/regression/rotate4.c | 1 - src/regression/rotate5.c | 1 - src/regression/sub.c | 4 ++-- src/regression/sub2.c | 2 +- src/regression/switch1.c | 3 +-- src/regression/while.c | 1 - 25 files changed, 19 insertions(+), 31 deletions(-) diff --git a/src/regression/Makefile b/src/regression/Makefile index 0c9c69d1..d2914e34 100644 --- a/src/regression/Makefile +++ b/src/regression/Makefile @@ -52,7 +52,7 @@ Q ?= @ # be quiet CC = sdcc LINKER = gplink TARGETPIC = 16f877 -CFLAGS = -Wl,--map -I ../../device/include/pic -mpic14 -pp$(TARGETPIC) +CFLAGS = -Wl,--map -I ../../device/include/pic -mpic14 -pp$(TARGETPIC) -Wl,-q .SUFFIXES: .asm .c .cod .stc @@ -74,7 +74,6 @@ SRC = b.c \ and2.c \ b.c \ bool1.c \ - bool2.c \ bool3.c \ call1.c \ compare.c \ @@ -113,6 +112,7 @@ SRC = b.c \ # rotate7.c \ # string1.c \ # struct1.c \ +# bool2.c \ COD := $(patsubst %.c, %.cod, $(SRC)) ASM := $(patsubst %.c, %.asm, $(SRC)) diff --git a/src/regression/add.c b/src/regression/add.c index d3e1406b..118d5c96 100644 --- a/src/regression/add.c +++ b/src/regression/add.c @@ -4,7 +4,7 @@ /* bit types are not ANSI - so provide a way of disabling bit types * if this file is used to test other compilers besides SDCC */ -#define SUPPORT_BIT_TYPES 1 +#define SUPPORT_BIT_TYPES 0 /* Some compilers that support bit types do not support bit arithmetic * (like bitx = bity + bitz;) */ diff --git a/src/regression/add2.c b/src/regression/add2.c index f802f03e..f9536e4d 100644 --- a/src/regression/add2.c +++ b/src/regression/add2.c @@ -4,7 +4,7 @@ /* bit types are not ANSI - so provide a way of disabling bit types * if this file is used to test other compilers besides SDCC */ -#define SUPPORT_BIT_TYPES 1 +#define SUPPORT_BIT_TYPES 0 unsigned char failures=0; diff --git a/src/regression/add3.c b/src/regression/add3.c index 69597acf..a1990af0 100644 --- a/src/regression/add3.c +++ b/src/regression/add3.c @@ -4,7 +4,7 @@ /* bit types are not ANSI - so provide a way of disabling bit types * if this file is used to test other compilers besides SDCC */ -#define SUPPORT_BIT_TYPES 1 +#define SUPPORT_BIT_TYPES 0 unsigned char failures=0; diff --git a/src/regression/bool1.c b/src/regression/bool1.c index bc7c602c..46857bfd 100644 --- a/src/regression/bool1.c +++ b/src/regression/bool1.c @@ -2,7 +2,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; diff --git a/src/regression/bool3.c b/src/regression/bool3.c index 2bbbea4f..d3092da2 100644 --- a/src/regression/bool3.c +++ b/src/regression/bool3.c @@ -6,8 +6,6 @@ unsigned char failures=0; -bit bit0 = 0; -bit bit1 = 0; unsigned int ui0 = 0; unsigned int ui1 = 0; unsigned char uc0 = 0; diff --git a/src/regression/call1.c b/src/regression/call1.c index 76d6278b..f64a0260 100644 --- a/src/regression/call1.c +++ b/src/regression/call1.c @@ -2,7 +2,6 @@ unsigned char failures = 0; -bit bit0 = 0; unsigned int uint0 = 0; unsigned int uint1 = 0; unsigned char uchar0 = 0; diff --git a/src/regression/compare.c b/src/regression/compare.c index bba72f6a..29843f4e 100644 --- a/src/regression/compare.c +++ b/src/regression/compare.c @@ -10,9 +10,6 @@ */ -bit bit0 = 0; -bit bit1 = 0; - unsigned char failures = 0; unsigned char achar0 = 0; diff --git a/src/regression/compare2.c b/src/regression/compare2.c index 4f9bc4ca..d14aeb06 100644 --- a/src/regression/compare2.c +++ b/src/regression/compare2.c @@ -3,7 +3,6 @@ unsigned char failures = 0; unsigned char dummy = 0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; diff --git a/src/regression/compare3.c b/src/regression/compare3.c index 1423dd03..480eceb0 100644 --- a/src/regression/compare3.c +++ b/src/regression/compare3.c @@ -7,7 +7,6 @@ unsigned char failures = 0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; diff --git a/src/regression/compare4.c b/src/regression/compare4.c index 1c38aa13..4af453ad 100644 --- a/src/regression/compare4.c +++ b/src/regression/compare4.c @@ -8,7 +8,6 @@ unsigned char failures = 0; -bit bit0 = 0; int int0 = 0; int int1 = 0; char char0 = 0; diff --git a/src/regression/compare5.c b/src/regression/compare5.c index b6219e68..238755a2 100644 --- a/src/regression/compare5.c +++ b/src/regression/compare5.c @@ -8,7 +8,6 @@ unsigned char failures = 0; -bit bit0 = 0; int int0 = 0; int int1 = 0; char char0 = 0; diff --git a/src/regression/for.c b/src/regression/for.c index 70c8ae20..a22a0981 100644 --- a/src/regression/for.c +++ b/src/regression/for.c @@ -2,7 +2,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int uint0 = 0; unsigned int uint1 = 0; unsigned char uchar0 = 0; diff --git a/src/regression/nestfor.c b/src/regression/nestfor.c index 52a348e3..77bfff26 100644 --- a/src/regression/nestfor.c +++ b/src/regression/nestfor.c @@ -3,7 +3,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int uint0 = 0; unsigned int uint1 = 0; unsigned char uchar0 = 0; diff --git a/src/regression/or1.c b/src/regression/or1.c index 27aeeace..b828eb00 100644 --- a/src/regression/or1.c +++ b/src/regression/or1.c @@ -1,10 +1,16 @@ #include "gpsim_assert.h" +/* bit types are not ANSI - so provide a way of disabling bit types + * if this file is used to test other compilers besides SDCC */ +#define SUPPORT_BIT_TYPES 0 + unsigned char failures=0; +#if SUPPORT_BIT_TYPES bit bit0 = 0; bit bit1 = 0; bit bit2 = 0; +#endif unsigned int uint0 = 0; unsigned int uint1 = 0; @@ -138,6 +144,7 @@ void or_uint2uint(void) } +#if SUPPORT_BIT_TYPES void or_bits1(void) { @@ -151,6 +158,7 @@ void or_bits2(void) bit0 = bit1 | bit2; } +#endif void main(void) { @@ -167,6 +175,7 @@ void main(void) uint1=1; or_uint2uint(); +#if SUPPORT_BIT_TYPES or_bits1(); if(bit0) failures++; @@ -183,7 +192,7 @@ void main(void) or_bits2(); if(!bit0) failures++; - +#endif done(); } diff --git a/src/regression/ptrfunc.c b/src/regression/ptrfunc.c index 7fb42b17..317b19fa 100644 --- a/src/regression/ptrfunc.c +++ b/src/regression/ptrfunc.c @@ -2,7 +2,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int uint0 = 0; unsigned int uint1 = 0; diff --git a/src/regression/rotate1.c b/src/regression/rotate1.c index a889ec69..6d909d4b 100644 --- a/src/regression/rotate1.c +++ b/src/regression/rotate1.c @@ -2,7 +2,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; diff --git a/src/regression/rotate2.c b/src/regression/rotate2.c index 16635bc6..1d251100 100644 --- a/src/regression/rotate2.c +++ b/src/regression/rotate2.c @@ -3,7 +3,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; diff --git a/src/regression/rotate3.c b/src/regression/rotate3.c index 1acae273..70aab091 100644 --- a/src/regression/rotate3.c +++ b/src/regression/rotate3.c @@ -3,7 +3,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; diff --git a/src/regression/rotate4.c b/src/regression/rotate4.c index 9f0a282d..8d8f6f52 100644 --- a/src/regression/rotate4.c +++ b/src/regression/rotate4.c @@ -3,7 +3,6 @@ unsigned char failures=0; -bit bit0 = 0; unsigned int uint0 = 0; unsigned int uint1 = 0; unsigned char uchar0 = 0; diff --git a/src/regression/rotate5.c b/src/regression/rotate5.c index 00b9451d..dc5d0b2c 100644 --- a/src/regression/rotate5.c +++ b/src/regression/rotate5.c @@ -3,7 +3,6 @@ unsigned char failures=0; -bit bit0 = 0; signed int aint0 = 0; signed int aint1 = 0; signed char achar0 = 0; diff --git a/src/regression/sub.c b/src/regression/sub.c index fb0f1d6b..db28d209 100644 --- a/src/regression/sub.c +++ b/src/regression/sub.c @@ -3,7 +3,7 @@ /* bit types are not ANSI - so provide a way of disabling bit types * if this file is used to test other compilers besides SDCC */ -#define SUPPORT_BIT_TYPES 1 +#define SUPPORT_BIT_TYPES 0 /* Some compilers that support bit types do not support bit arithmetic * (like bitx = bity + bitz;) */ @@ -149,7 +149,6 @@ void sub_bits(void) failures++; #endif } -#endif /* sub_bit2uchar(void) - assumes bit0 = 1, achar0 = 7 */ @@ -177,6 +176,7 @@ void sub_bit2uint(void) failures++; } +#endif void sub_ucharFromLit(void) { diff --git a/src/regression/sub2.c b/src/regression/sub2.c index 60c1c909..44b54d5e 100644 --- a/src/regression/sub2.c +++ b/src/regression/sub2.c @@ -3,7 +3,7 @@ /* bit types are not ANSI - so provide a way of disabling bit types * if this file is used to test other compilers besides SDCC */ -#define SUPPORT_BIT_TYPES 1 +#define SUPPORT_BIT_TYPES 0 /* Some compilers that support bit types do not support bit arithmetic * (like bitx = bity + bitz;) */ diff --git a/src/regression/switch1.c b/src/regression/switch1.c index 412a8768..71730ea4 100644 --- a/src/regression/switch1.c +++ b/src/regression/switch1.c @@ -1,7 +1,6 @@ #include "gpsim_assert.h" unsigned char failures=0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; @@ -56,7 +55,7 @@ void switch2(void) } -main(void) +void main(void) { achar0 = 0; diff --git a/src/regression/while.c b/src/regression/while.c index 714c1053..4429b885 100644 --- a/src/regression/while.c +++ b/src/regression/while.c @@ -2,7 +2,6 @@ unsigned char failures = 0; -bit bit0 = 0; unsigned int aint0 = 0; unsigned int aint1 = 0; unsigned char achar0 = 0; -- 2.39.5