Re: [hatari-devel] warning: array subscript has type ‘char’ [-Wchar-subscripts]

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Mon, 09 Jun 2014 22:23:53 +0200
schrieb Vincent Rivière <vincent.riviere@xxxxxxxxxxx>:

> On 09/06/2014 22:14, Vincent Rivière wrote:
> > warning: array subscript has type ‘char’ [-Wchar-subscripts]
> 
> Finally, it seems to be a Newlib (Cygwin's libc) feature:
> https://sourceware.org/ml/newlib/2014/msg00066.html
> 
> The theoretical clean solution would be to cast the ctype function
> arguments to unsigned char, but I'm not fully convinced that it's
> sane to cripple the source code that way.

I thought about this for a while, but finally I think it is the safest
solution to do the typecasts. Otherwise, "the behavior of these
functions is undefined" according to the man-page of e.g. tolower().
So I changed the source code now ... if you've got some spare time,
could you please try it again to see whether I catched all spots?

 Thanks,
  Thomas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/