mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +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:
@@ -120,7 +120,10 @@
|
|||||||
|
|
||||||
/* The extra casts work around common compiler bugs. */
|
/* The extra casts work around common compiler bugs. */
|
||||||
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
|
#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))
|
#define TYPE_MAXIMUM(t) (~ (t) 0 - TYPE_MINIMUM (t))
|
||||||
|
|
||||||
#ifndef INT_MAX
|
#ifndef INT_MAX
|
||||||
|
|||||||
Reference in New Issue
Block a user