From cd4c2d0fdc30260f3cbb7d4bd4bd3decffc31f8d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 24 Jan 1998 08:45:55 +0000 Subject: (TYPE_MINIMUM): Add extra outer cast to work around bug in Cray C 5.0.3.0 when T == time_t. --- src/system.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/system.h') diff --git a/src/system.h b/src/system.h index 48a2737cf..53cbff081 100644 --- a/src/system.h +++ b/src/system.h @@ -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 -- cgit v1.2.3-54-g00ecf