PATCH: avoid warnings on array[CHAR_CONSTANT]

Jonathan Lennox lennox@cs.columbia.edu
Tue Jun 10 20:28:00 GMT 2003


On Tuesday, June 10 2003, "Mike Stump" wrote to "Jonathan Lennox, gcc-patches@gcc.gnu.org, Eddie Kohler" saying:

> On Monday, June 9, 2003, at 12:52 PM, Jonathan Lennox wrote:
> > Eddie Kohler writes:
> >> The following patch avoids the "array subscript has type `char'" 
> >> warning in
> >> C++ when the subscript is a character constant with value between 0 
> >> and
> >> 127. This supports the following common usage pattern:
> >
> > Shouldn't this be based on the target's SCHAR_MAX, instead?  GCC 
> > supports
> > platforms with 9-bit bytes.
> 
> Hum...  Which one?

Isn't there a PDP-10 port?  Maybe I'm mis-remembering.

-- 
Jonathan Lennox
jon at eyrie dot org



More information about the Gcc-patches mailing list