On Mon, 24 Feb 2003, Richard B. Johnson wrote:
>
> I think you must keep these warnings in! There are many bugs
> that these uncover uncluding loops that don't terminate correctly
> but seem to work for "most all" cases. These are the hard-to-find
> bugs that hit you six months after release.
At least historically gcc has been so f*cking bad at the "unsigned vs
signed" warnings that they are totally useless.
Maybe things are better in gcc-3.3.
Maybe not.
> size_t i;
>
> while((i = do_forever()) > 0)
> ;
>
> ... do_forever() finally errors out and returns -1 stuck(forever).
Does gcc still warn about things like
#define COUNT (sizeof(array)/sizeof(element))
int i;
for (i = 0; i < COUNT; i++)
...
where COUNT is obviously unsigned (because sizeof is size_t and thus
unsigned)?
Gcc used to complain about things like that, which is a FUCKING DISASTER.
Any compiler that complains about the above should be shot in the head,
and the warning should be killed.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Feb 28 2003 - 22:00:22 EST