[lkml]   [2008]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 5/5 ver2] debug: BUILD_BUG_ON: error on non-const expressions
    On Wednesday 03 September 2008 01:57:31 Boaz Harrosh wrote:
    > +#define BUILD_BUG_ON(e) \
    > +       do { struct {int:-!!(e); } x __maybe_unused;} while(0)

    Why did you hate the void cast again? Simplest should
    be "(void)BUILD_BUG_ON_ZERO(e)". But if not, it seems to me that it's
    cleaner to do:

    #define BUILD_BUG_ON(e) \
    do { } while(BUILD_BUG_ON_ZERO(e))

    No chance of the compiler emitting unused vars.


    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: 2008-10-03 03:35    [W:0.018 / U:16.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site