RE: mainline build failure for arm64 allmodconfig with clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



...
> And often that char isn't actually a 'char', it is actually an 'int',
> either because you have situations like 'getch()', or you have simply
> just the usual C expression rules, ie you have something like
> 
>         isprint(c) ? c : '.'
> 
> where even if 'c' is of type 'char', the end result is 'int'.

Which is, of course, invalid C :-)
The domain of the isxxxx() functions is 'the values of char
cast to unsigned int' and EOF.
So typically [-1 .. 255].
Passing a signed char variable to isprint() is likely to
generate undesired behaviour (like a code dump).

It has to be said that I did a full trawl through the NetBSD
userspace code base to fix all the isxxx() calls and failed
to find a single one that could actually pass EOF.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux