[lkml]   [2003]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.101 / U:3.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site