PATCH: avoid warnings on array[CHAR_CONSTANT]

Mike Stump mrs@apple.com
Tue Jun 10 19:19:00 GMT 2003


On Monday, June 9, 2003, at 06:21 PM, Eddie Kohler wrote:
> 	* typeck.c (build_array_ref): Don't warn about char-type array
> 	subscripts that are nonnegative integer constants no larger than
> 	SCHAR_MAX.

This is wrong.  SCHAR_MAX is the host's SCHAR_MAX.

Check out TYPE_MAX_VALUE (signed_char_type_node) or some value close to 
it.



More information about the Gcc-patches mailing list