lkml.org 
[lkml]   [2001]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [IDEA+RFC] Possible solution for min()/max() war
    From
    Date
    Roman Zippel <zippel@linux-m68k.org> writes:

    |> Hi,
    |>
    |> Linus Torvalds wrote:
    [...]
    |> > You just fixed the "re-use arguments" bug - which is a bug, but doesn't
    |> > address the fact that most of the min/max bugs are due to the programmer
    |> > _indending_ a unsigned compare because he didn't even think about the
    |> > type.
    |>
    |> You maybe fixed a few bugs, but this new macro will only cause new
    |> problems in the future. If we change only a single type, you have to
    |> scan all min/max users if they possibly need to be changed too. Thanks
    |> to the cast, the compiler won't even remotely help you finding them.

    There is no cast in the min/max macros.

    Andreas.

    --
    Andreas Schwab "And now for something
    SuSE Labs completely different."
    Andreas.Schwab@suse.de
    SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
    Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
    -
    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:17    [W:0.024 / U:59.624 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site