Proof positive the "signedness of char *" warning is useless.

John Z. Bohach jzb at
Fri Dec 2 16:45:55 UTC 2005

On Friday 02 December 2005 07:47, Rob Landley wrote:

> It does match the prototype.  The prototype is "char".  The signedness of
> that was indeterminate.

Does not match.  Watch:

void foo(char x);
signed char y;

is not the same as:

void foo(char x);
char y;

The "sign" of char y was removed and left to the compiler.  Thus any change in 
the compiler will not cause warnigns or runtime issues.  The C language 
allowed people to write code with indeterminate chars and determinate chars 
being mixed without warning, as long as it matched the assumptions of the 
compiler.  Now THAT is a compiler bug.  But its allowed by the C language, so 
you can't really blame the compiler.  Now they changed it to warn, so what?  
The warnings should always have been there, and such code should never have 
been written.  Yes, we've all done it, but always knew that wasn't portable 
code, because the signedness of char was always compiler dependent.

Besides, you've got more than just char signed warnings in the text file of 
errors you posted, and that's when I got involved in the discussion.  As I've 
stated previously, your solution is fine.  The only point I'm trying to make 
is that the signedness of char's must always be explicitly specified in new 
code that people write in order to avoid this issue in the future.  Its not 
the compiler's fault.

> Now it's specifying -funsigned-char.  It is now determinate.
> You are now in my spam filter.

Why don't you post your compiler grumblings on the gcc mailing list, maybe 
they'll put you in their spam filter...

> Go away.

I was never here...

     ###  Any similarity between my views and the truth is completely ###
     ###  coincidental, except that they are endorsed by NO ONE       ###

More information about the busybox mailing list