lkml.org 
[lkml]   [2018]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3] kernel.h: Skip single-eval logic on literals in min()/max()
    On Fri, Mar 9, 2018 at 4:07 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
    >
    > A brief poke failed to reveal a workaround - gcc-4.4.4 doesn't appear
    > to know that __builtin_constant_p(x) is a constant. Or something.

    LOL.

    I suspect it might be that it wants to evaluate
    __builtin_choose_expr() at an earlier stage than it evaluates
    __builtin_constant_p(), so it's not that it doesn't know that
    __builtin_constant_p() is a constant, it just might not know it *yet*.

    Maybe.

    Side note, if it's not that, but just the "complex" expression that
    has the logical 'and' etc, maybe the code could just use

    __builtin_constant_p((x)+(y))

    or something.

    But yeah:

    > Sigh. Wasn't there some talk about modernizing our toolchain
    > requirements?

    Maybe it's just time to give up on 4.4. We wanted 4.5 for "asm goto",
    and once we upgrade to 4.5 I think Arnd said that no distro actually
    ships it, so we might as well go to 4.6.

    So maybe this is just the excuse to finally make that official, if
    there is no clever workaround any more.

    Linus

    \
     
     \ /
      Last update: 2018-03-10 01:30    [W:4.189 / U:0.556 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site