[lkml]   [2002]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 2.5.8-dj1 : arch/i386/kernel/smpboot.c error

    On 2002.04.17 Adam Kropelin wrote:
    >Rick Stevens wrote:
    >> Adam Kropelin wrote:
    >>> Indeed. The optimization step that (presumably) removes the body
    >>> of the if() must happen after the body has been fully evaluated.
    >>> Makes sense, I guess, now that I think about it...
    >> Right. If the first condition of a logical AND statement is false,
    >> the remainder need not be evaluated at all. Hence, the entire if
    >> statement can (and perhaps should) be eliminated by the compiler,
    >> since the condition is false.
    >> I didn't see what the actual message from the compiler was, but it
    >> was probably just a warning.
    >Thanks for the help, but it was an error, not a warning.
    >It is caused by invalid code inside the body of the if(). The question
    >is not what is causing the error but why the compiler is evaluating the
    >body at all, given that the conditional is always false.
    >Apparently the body is evaluated prior to the optimizer getting a
    >chance to nullify the whole construct.

    AFAIK, you first parse C to build a tree of commands, expresions, etc,
    and then you do the rest on the tree (optimizations at source-code level,
    like CSE, ie, detection of equal subtrees, or for example
    killig and if tree if it is always false).

    Hope this helps.

    J.A. Magallon # Let the source be with you...
    Mandrake Linux release 8.3 (Cooker) for i586
    Linux werewolf 2.4.19-pre7-jam1 #2 SMP Wed Apr 17 21:20:31 CEST 2002 i686
    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:22    [W:0.022 / U:7.096 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site