]> git.baikalelectronics.ru Git - kernel.git/commit
bug.h: prevent double evaulation of `condition' in BUILD_BUG_ON
authorDaniel Santos <daniel.santos@pobox.com>
Fri, 22 Feb 2013 00:41:45 +0000 (16:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 22 Feb 2013 01:22:16 +0000 (17:22 -0800)
commit2fb33d1c056910f260db002c679b68d47dec3b06
treef82e7ac260a7705459c77bd37bf2733047542921
parent668d0d9bb2dcfc59fbcdd5daf79e83e41f4b8044
bug.h: prevent double evaulation of `condition' in BUILD_BUG_ON

When calling BUILD_BUG_ON in an optimized build using gcc 4.3 and later,
the condition will be evaulated twice, possibily with side-effects.  This
patch eliminates that error.

[akpm@linux-foundation.org: tweak code layout]
Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Joe Perches <joe@perches.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/bug.h