powerset.h (SET_WORD, [...]): Do not redefine based on USE_CHAR.
authorJeffrey A Law <law@cygnus.com>
Thu, 2 Sep 1999 23:55:52 +0000 (23:55 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 2 Sep 1999 23:55:52 +0000 (17:55 -0600)
        * powerset.h (SET_WORD, SET_SHORT, SET_CHAR): Do not redefine based
        on USE_CHAR.
        (USE_CHAR): No longer define.
        * eqps.c ffsetclrps.c flsetclrps.c: Remove !USE_CHARS support.

From-SVN: r29069

libchill/ChangeLog
libchill/eqps.c
libchill/ffsetclrps.c
libchill/flsetclrps.c
libchill/powerset.h

index d01f4efa77d98a4a108a6a2b34a295d1ac464912..4704da9a7c2edd92acba0fabfb2b8a0d829868bb 100644 (file)
@@ -1,3 +1,10 @@
+Thu Sep  2 17:50:47 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * powerset.h (SET_WORD, SET_SHORT, SET_CHAR): Do not redefine based
+       on USE_CHAR.
+       (USE_CHAR): No longer define.
+       * eqps.c ffsetclrps.c flsetclrps.c: Remove !USE_CHARS support.
+
 Mon Aug 30 16:42:45 1999  Hans-Peter Nilsson  <hp@axis.se>
 
        * Makefile.in (chillrt0.o): Depend on chillrt0.c explicitly.
index 97e4269e940e37210dedc08a108e4a7d7c9d5e9a..e0e00db3cc2b77eca3493b33a7a9e5059e8d22b6 100644 (file)
@@ -55,27 +55,6 @@ __eqpowerset (left, right, bitlength)
      SET_WORD *right;
      unsigned long bitlength;
 {
-#ifndef USE_CHARS
-  if (bitlength <= SET_CHAR_SIZE)
-    {
-      SET_CHAR c = *(SET_CHAR *)left ^ *(SET_CHAR *)right;
-      MASK_UNUSED_CHAR_BITS (&c, bitlength);
-      return (c == 0) ? 1 : 0;
-    }
-  else if (bitlength <= SET_SHORT_SIZE)
-    {
-      SET_SHORT c = *(SET_SHORT *)left ^ *(SET_SHORT *)right;
-      MASK_UNUSED_SHORT_BITS (&c, bitlength);
-      return (c == 0) ? 1 : 0;
-    }
-  else if (bitlength <= SET_WORD_SIZE)
-    {
-      SET_WORD c = *(SET_WORD *)left ^ *(SET_WORD *)right;
-      MASK_UNUSED_WORD_BITS (&c, bitlength % SET_WORD_SIZE);
-      return (c == 0) ? 1 : 0;
-    }
-  else
-#endif
     {
       SET_WORD c;
       register unsigned long i;
index 9498f4e004805018f0d568ef85a5604f73a57729..a5c202c7b93f9734ddbf4421c8ef5aa613e22392 100644 (file)
@@ -56,23 +56,6 @@ __ffsetclrpowerset (ps, bitlength, first_bit)
   if (first_bit >= bitlength)
     return -1;
 
-#ifndef USE_CHARS
-  if (bitlength <= SET_CHAR_SIZE)
-    {
-      for (bitno = first_bit; bitno < bitlength; bitno++)
-       if (GET_BIT_IN_CHAR (*((SET_CHAR *)ps), bitno))
-         break;
-      return bitno == bitlength ? -1 : bitno;
-    }
-  else if (bitlength <= SET_SHORT_SIZE)
-    {
-      for (bitno = first_bit; bitno < bitlength; bitno++)
-       if (GET_BIT_IN_SHORT (*((SET_SHORT *)ps), bitno))
-         break;
-      return bitno == bitlength ? -1 : bitno;
-    }
-  else
-#endif
     {
       unsigned int words_to_skip = (unsigned) first_bit / SET_WORD_SIZE;
       unsigned long cnt = words_to_skip * SET_WORD_SIZE;
index 44e97173191a896db375e7cc389d98bf516db9e6..fe86c0c9abfc68a4fc7dc7df3b513c15c6fbc0d6 100644 (file)
@@ -57,23 +57,6 @@ __flsetclrpowerset (ps, bitlength, first_bit)
 {
   register int bitno;
 
-#ifndef USE_CHARS
-  if (bitlength <= SET_CHAR_SIZE)
-    {
-      for (bitno = bitlength - 1; bitno >= first_bit; bitno--)
-       if (GET_BIT_IN_CHAR (*((SET_CHAR *)ps), bitno))
-         break;
-      return bitno < first_bit ? -1 : bitno;
-    }
-  else if (bitlength <= SET_SHORT_SIZE)
-    {
-      for (bitno = bitlength - 1; bitno >= first_bit; bitno--)
-       if (GET_BIT_IN_SHORT (*((SET_SHORT *)ps), bitno))
-         break;
-      return bitno < first_bit ? -1 : bitno;
-    }
-  else
-#endif
     {
       SET_WORD *p, c;
       bitno = bitlength - 1;
index ea27cddc389e9ec4ee8330db7ef60f2532fe3aa3..e40303a2eeb1fc9c5403fd044d19e74074ce95b5 100644 (file)
@@ -29,23 +29,15 @@ Boston, MA 02111-1307, USA.  */
 #ifndef _POWERSET_H
 #define _POWERSET_H
 
-#define USE_CHARS
-
-#ifdef USE_CHARS
+/* Do not set these to anything other than character types without fixing
+   their uses in andps.c and other files which implement bit sets operations.
 
+   The uses in those files will violate ANSI/ISO C aliasing rules as they
+   are currently written.  */
 #define SET_WORD unsigned char
 #define SET_CHAR  unsigned char
 #define SET_SHORT unsigned char
 
-#else
-
-#ifndef SET_WORD
-#define SET_WORD unsigned int
-#endif
-#define SET_CHAR  unsigned char
-#define SET_SHORT unsigned short
-#endif
-
 #define SET_WORD_SIZE (sizeof (char) * sizeof (SET_WORD))
 #define SET_SHORT_SIZE (sizeof (char) * sizeof (SET_SHORT))
 #define SET_CHAR_SIZE sizeof (char)