comparisons..
Andrew Morton
andrewm@uow.edu.au
Thu Jul 13 01:09:00 GMT 2000
"Martin v. Loewis" wrote:
>
> > Drat. I've wasted your time. Sorry.
> >
> > pwold011:/home/morton> gcc -v
> > Reading specs from /usr/lib/gcc-lib/i686-unknown-linux/2.7.2.3/specs
> > gcc version 2.7.2.3
> >
> > Any chance of a backport? :)
>
> mira% kgcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
> gcc version 2.7.2.3
> mira% kgcc -S -W a.c
> a.c: In function `y':
> a.c:5: warning: unsigned value < 0 is always 0
>
> What do you get?
Enlightenment :)
The kernel uses -Wall, and this particular warning is not enabled with
-Wall.
Unfortunately using `-W' in the kernel makefiles generates a truckload
of warnings. Is there a way of unbundling the `if (unsigned < 0)'
warning with a standalone flag? Like -Wnegative-unsigned? It appears
not.
The whole reason I brought this up is that someone found an `if
(unsigned < 0)' bug today. Made my ears prick up.
A useful exercise would be to compile the kernel with `-W' and filter
out all the noise. I'll do that tonight.
Thanks again.
More information about the Gcc
mailing list