]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/compiler.h
compiler.h, bug.h: prevent double error messages with BUILD_BUG{,_ON}
[karo-tx-linux.git] / include / linux / compiler.h
index 4c638be76093a7ae94867cf4fa000797d4ccad89..423bb6bd660ff543fe38f7b3763406327909cfe5 100644 (file)
@@ -307,7 +307,12 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
 #endif
 #ifndef __compiletime_error
 # define __compiletime_error(message)
+# define __compiletime_error_fallback(condition) \
+       do { ((void)sizeof(char[1 - 2*!!(condition)])); } while (0)
+#else
+# define __compiletime_error_fallback(condition) do { } while (0)
 #endif
+
 /*
  * Prevent the compiler from merging or refetching accesses.  The compiler
  * is also forbidden from reordering successive instances of ACCESS_ONCE(),