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


    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/

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