lkml.org 
[lkml]   [2001]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.4.9 does not compile [PATCH]
    Hi,

    "David S. Miller" wrote:

    > IMHO, it would have been more elegant to use the typeof construct provided
    > by gcc in the new macro instead of introducing a type parameter like this...
    >
    > The whole point was to make users explicitly state the type so they
    > would have to think about it.

    I have two problems with this:
    1. They maybe think once about it, but are they doing it a second time?
    If the type of the argument is changed somewhere in the header, the min
    argument is easily missed, since...
    2. This macro doesn't produce a warning like the typeof version does.
    The typeof version warns you about signed/unsigned compares, while an
    assignment gives no warning.

    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/

    \
     
     \ /
      Last update: 2005-03-22 12:57    [W:0.022 / U:0.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site