INT_MIN bug
karish at mindcrf.UUCP
karish at mindcrf.UUCP
Thu Jul 19 03:49:09 AEST 1990
In article <1295 at tuewsd.win.tue.nl> wsinpdb at lso.win.tue.nl (Paul de Bra) writes:
>In sVr3.2 (on the 386) the file <limits.h> contains the definitions
>#define INT_MIN -2147483648
>and
>#define LONG_MIN -2147483648L
>
>which, according to K&R (second edition) are unsigned (constant) expressions
>in ANSI C.
K&R II, section B11, does not say that the values must be unsigned.
The C Standard specifically requires that they have the appropriate signs:
2.2.4.2, Numerical Limits
The values given below shall be replaced by constant expressions
suitable for use in #if preprocessing directives. Their
implementation-defined values shall be equal or greater in
magnitude (absolute value) to those shown, with the same sign.
[ ... ]
INT_MIN -32767
LONG_MIN -2147483647
--
Chuck Karish karish at mindcraft.com
Mindcraft, Inc. (415) 323-9000
More information about the Comp.bugs.sys5
mailing list