1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-13 07:15:50 +02:00

(TYPE_MINIMUM): Add extra outer cast to work around

bug in Cray C 5.0.3.0 when T == time_t.
This commit is contained in:
Jim Meyering
1998-01-24 08:45:55 +00:00
parent 8a0550a816
commit cd4c2d0fdc

View File

@@ -120,7 +120,10 @@
/* The extra casts work around common compiler bugs. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
#define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
It is necessary at least when t == time_t. */
#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
#define TYPE_MAXIMUM(t) (~ (t) 0 - TYPE_MINIMUM (t))
#ifndef INT_MAX