Messages in this thread | | | Date | Fri, 28 Feb 2003 19:12:53 -0800 | From | Richard Henderson <> | Subject | Re: [PATCH] s390 (7/13): gcc 3.3 adaptions. |
| |
On Mon, Feb 24, 2003 at 01:02:39PM -0800, Linus Torvalds wrote: > 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)?
Yes. We don't do complete value-range propagation to figure out if a warning is needed. We only look at the comparison itself and note that one of the arguments changed signedness due to forced promotions.
r~ - 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/
| |