* src/SDCCsymt.c (compareType): fixed bugs 1738367 and 1745717 with patch
[fw/sdcc] / support / regression / tests / bitvars.c
index b9a146a0c53a36f49cfcf123a7ed78bc9011a383..d1ca006b5bd0a4818dea4201b646d06efe44c514 100644 (file)
 #pragma disable_warning 180 //no warning about using complement on bit/unsigned char
 #endif
 
-#if defined (SDCC_STACK_AUTO) || defined (SDCC_hc08) || defined (SDCC_z80)
-#define NO_BITS
-#endif
-
-#if defined (__GNUC__) && (__GNUC__ < 3)
-//since this fails on GCC 2.95.4 on alpha and I don't know how to detect alpha...
-#define NO_BITS
-#endif
-
-#ifndef NO_BITS
+#ifdef __bool_true_false_are_defined
 
 #define TYPE_{type}
 
@@ -35,12 +26,12 @@ char complement(bool a, bool b)
 
 {type} _0 = 0, _1 = 1, _ff = 0xFF, _ffff = -1;
 
-#endif
+#endif //__bool_true_false_are_defined
 
 void
 testBits(void)
 {
-#ifndef NO_BITS
+#ifdef __bool_true_false_are_defined
   bool x = 2;
   ASSERT (foo(x,3,4) == 6);
 
@@ -64,5 +55,5 @@ testBits(void)
     ASSERT (complement (~_ffff, 0));
 #endif
 
-#endif
+#endif //__bool_true_false_are_defined
 }