
On Sat, Feb 02, 2008 at 08:49:01PM +0100, Luca Barbato wrote:
Rich Felker wrote:
I strongly dislike this sort of change. Pointer signedness warnings are idiotic and should be disabled.
fixing properly and keeping in mind unsigned char != signed char != char would be better.
That's orthogonal to the issue at hand here. The function takes a const char * argument but operates on arbitrary bytes. However memcmp is probably the appropriate function to use, but it has the same issue. What one really needs to realize is that signed/unsigned is a property of arithmetic operations performed on data, NOT a property of the data itself. C made a very bad design choice in making these properties of the types. Ignoring the difference between pointers to unsigned and signed versions of the same type is completely valid and often useful and it's annoying that gcc spams warnings about it. Rich