From: Jim Meyering Date: Sat, 24 Jan 1998 08:45:55 +0000 (+0000) Subject: (TYPE_MINIMUM): Add extra outer cast to work around X-Git-Tag: FILEUTILS-3_16l~31 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=cd4c2d0fdc30260f3cbb7d4bd4bd3decffc31f8d;p=thirdparty%2Fcoreutils.git (TYPE_MINIMUM): Add extra outer cast to work around bug in Cray C 5.0.3.0 when T == time_t. --- diff --git a/src/system.h b/src/system.h index 48a2737cf4..53cbff0814 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