[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: standards/46276: CHAR_MAX/CHAR_MIN don't change with -funsigned-char
The following reply was made to PR standards/46276; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
Subject: Re: standards/46276: CHAR_MAX/CHAR_MIN don't change with
Date: Wed, 28 Mar 2012 18:32:52 +0000
On Wed, Mar 28, 2012 at 06:25:00PM +0000, dholland%netbsd.org@localhost wrote:
> Move the definitions of CHAR_MIN/CHAR_MAX out of MD limits.h and use
> something gcc-provided to pick the signed or unsigned values. If gcc
> doesn't provide a way to check at runtime, I guess we need to add one.
uwe says gcc provides __CHAR_UNSIGNED__ to test with.
In both gcc 4.1 and 4.5 the "#if ('7' - '8') < 0" test can be used to
determine if char is unsigned, but there is still a question as to
whether this is correct gcc behavior.
David A. Holland
Main Index |
Thread Index |