[lkml]   [2006]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH -mm] sys_semctl gcc 4.1 warning fix
    Al Viro <> wrote:
    > On Wed, May 10, 2006 at 03:31:29PM -0700, David S. Miller wrote:
    > > From: Al Viro <>
    > > Date: Wed, 10 May 2006 23:10:24 +0100
    > >
    > > > But that's the argument in favour of using diff, not shutting the
    > > > bogus warnings up...
    > >
    > > IMHO, the tree should build with -Werror without exception.
    > > Once you have that basis, new ones will not show up easily
    > > and the hard part of the battle has been won.
    > >
    > > Yes, people will post a lot of bogus versions of warning fixes, but
    > > we're already good at flaming those off already :-)
    > Alternatively, gcc could get saner. Seriously, some very common patterns
    > trigger that shit - e.g. function that returns error or 0 and stores
    > value to *pointer_argument in case of success. It's a clear regression
    > in 4.x and IMO should be treated as gcc bug.

    Sure - it's sad and we need some workaround.

    The init_self() thingy seemed reasonable to me - it shuts up the warning
    and has no runtime cost. What we could perhaps do is to make

    #define init_self(x) (x = x)

    only if the problematic gcc versions are detected. Later, if/when gcc gets
    fixed up, we use

    #define init_self(x) x

    Or something. Probably a more specific name than "init_self" is needed in
    this case - something that indicates that it's a specific workaround for
    specific gcc versions.

    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: 2006-05-11 01:11    [W:0.021 / U:5.304 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site