diff options
-rw-r--r-- | include/linux/compiler_attributes.h | 1 | ||||
-rw-r--r-- | include/linux/compiler_types.h | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h index 3de06a8fae73..b9121afd8733 100644 --- a/include/linux/compiler_attributes.h +++ b/include/linux/compiler_attributes.h @@ -113,7 +113,6 @@ #define __deprecated /* - * Optional: only supported since gcc >= 5.1 * Optional: not supported by clang * Optional: not supported by icc * diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 3f198879c292..1d32f4c03c9e 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -305,7 +305,13 @@ struct ftrace_likely_data { #ifdef __OPTIMIZE__ # define __compiletime_assert(condition, msg, prefix, suffix) \ do { \ - extern void prefix ## suffix(void) __compiletime_error(msg); \ + /* \ + * __noreturn is needed to give the compiler enough \ + * information to avoid certain possibly-uninitialized \ + * warnings (regardless of the build failing). \ + */ \ + __noreturn extern void prefix ## suffix(void) \ + __compiletime_error(msg); \ if (!(condition)) \ prefix ## suffix(); \ } while (0) |