aboutsummaryrefslogtreecommitdiff
path: root/libchill
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-09-02 23:55:52 +0000
committerJeff Law <law@gcc.gnu.org>1999-09-02 17:55:52 -0600
commitb5cc7593728fd7f39446dda95e5705ea593e188b (patch)
tree43e10aba51b15003f2baa77c56ca8bde38d90faa /libchill
parentec5288177605758fdca16766bed494923b7255f5 (diff)
downloadgcc-b5cc7593728fd7f39446dda95e5705ea593e188b.zip
gcc-b5cc7593728fd7f39446dda95e5705ea593e188b.tar.gz
gcc-b5cc7593728fd7f39446dda95e5705ea593e188b.tar.bz2
powerset.h (SET_WORD, [...]): Do not redefine based on USE_CHAR.
* 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
Diffstat (limited to 'libchill')
-rw-r--r--libchill/ChangeLog7
-rw-r--r--libchill/eqps.c21
-rw-r--r--libchill/ffsetclrps.c17
-rw-r--r--libchill/flsetclrps.c17
-rw-r--r--libchill/powerset.h16
5 files changed, 11 insertions, 67 deletions
diff --git a/libchill/ChangeLog b/libchill/ChangeLog
index d01f4ef..4704da9 100644
--- a/libchill/ChangeLog
+++ b/libchill/ChangeLog
@@ -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.
diff --git a/libchill/eqps.c b/libchill/eqps.c
index 97e4269..e0e00db 100644
--- a/libchill/eqps.c
+++ b/libchill/eqps.c
@@ -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;
diff --git a/libchill/ffsetclrps.c b/libchill/ffsetclrps.c
index 9498f4e..a5c202c 100644
--- a/libchill/ffsetclrps.c
+++ b/libchill/ffsetclrps.c
@@ -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;
diff --git a/libchill/flsetclrps.c b/libchill/flsetclrps.c
index 44e9717..fe86c0c 100644
--- a/libchill/flsetclrps.c
+++ b/libchill/flsetclrps.c
@@ -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;
diff --git a/libchill/powerset.h b/libchill/powerset.h
index ea27cdd..e40303a 100644
--- a/libchill/powerset.h
+++ b/libchill/powerset.h
@@ -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)