Re: [IDEA+RFC] Possible solution for min()/max() war

Roman Zippel (zippel@linux-m68k.org)
Fri, 31 Aug 2001 15:45:43 +0200


Hi,

Jamie Lokier wrote:

> 2. Warning added to GCC for casts which reduce argument range, but
> only when explicitly requested by an attribute on the cast...

How many false positives will this produce? I think, Linus will hate
this warning even more than -Wsign-compare.

> 3. Warning added to GCC for signed vs. unsigned comparisons
> _regardless_ of type size. This would also catch erroneous
> unsigned char vs. EOF checks in misuses of stdio.

Do you know of such bug in the context of min()?

bye, Roman
-
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/