[PATCH] clean up compiler warnings in libc/stdio/vfprintf.c

Rob Landley rob at landley.net
Thu Mar 8 23:37:58 UTC 2007


On Thursday 08 March 2007 9:35 am, Luciano Miguel Ferreira Rocha wrote:
> On Thu, Mar 08, 2007 at 09:23:08AM -0500, Rob Landley wrote:
> > On Thursday 08 March 2007 8:05 am, Luciano Miguel Ferreira Rocha wrote:
> > > On Thu, Mar 08, 2007 at 07:51:47AM -0500, Rob Landley wrote:
> > > > Is there any kind of --shutup-about-signedness-of-char-already flag we 
can 
> > > > pass to the darn compiler?
> > > > 
> > > 
> > > -Wno-pointer-sign?
> > >   Don't warn for pointer argument passing or assignment with different
> > >   signedness.
> > 
> > Except that shuts it up for short, int and long as well.
> 
> True, but, again, only for f(*arg) and *a = *v. Do you see problems
> arising from that in your code? (Or most code, for that matter.)

No, but I can see problems arising from it.

The fundamental problem here is that A) we can't control the signedness of 
char, B) indeterminately signed chars are used in lots of places in standard 
library functions.

So when we don't specify the signedness of char, the assumption is that we 
either know what we're doing or we don't CARE.  (I can see a warning for it, 
but I also want the ability to switch it OFF.)

If somebody explicitly says "signed char" or "unsigned char", and then mixes 
those, that's warning-worthy.  Mixing "char" with "unsigned char" isn't 
because on arm they're the same, and mixing "char" with "signed char" isn't 
because on x86 they're the same.

Rob
-- 
Vista: Windows Millenium Second Edition



More information about the uClibc mailing list