[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Fix undefined/miscompiled construct in kernel parameters

    On Mon, 16 Jun 2003, Rusty Russell wrote:
    > AFAICT, Roman's fix is correct; Richard admonished me in the past for
    > such code, IIRC, but this one slipped through.

    Roman's fix is fine, but the fact is, the original code was also fine.
    Yes, the C standard has all these rules about "within objects" for pointer
    differences, but the "objects" themselves can come from outside the
    compiler. As they did in this case.

    (Yeah, I could see the compiler warning about cases it suspects might be
    separate objects, but the end result should still be the right one).

    In general, I accept _local_ uglifications to work around compiler
    problems. But I do not accept non-local stuff like making for ugly calling
    conventions etc, which is why Andi's original patch was not acceptable to

    It turns out that the real bug was somewhere in the tool chain, and the
    linker should either honor alignment requirements or warn about them when
    it cannot. I suspect in this case the alignment requirement wasn't
    properly passed down the chain somewhere, I dunno. The problem is fixed,
    but for future reference please keep this in mind when working around
    compiler problems.

    If worst comes to worst, we'll have notes about certain compiler versions
    just not working. It's certainly happened before.


    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:36    [W:0.018 / U:30.416 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site