Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'compiler-attributes-for-linus-v5.16' of git://github.com/ojeda/linux

Pull compiler attributes update from Miguel Ojeda:
"An improvement for `__compiletime_assert` and a trivial cleanup"

* tag 'compiler-attributes-for-linus-v5.16' of git://github.com/ojeda/linux:
compiler_types: mark __compiletime_assert failure as __noreturn
Compiler Attributes: remove GCC 5.1 mention

+7 -2
-1
include/linux/compiler_attributes.h
··· 113 113 #define __deprecated 114 114 115 115 /* 116 - * Optional: only supported since gcc >= 5.1 117 116 * Optional: not supported by clang 118 117 * Optional: not supported by icc 119 118 *
+7 -1
include/linux/compiler_types.h
··· 305 305 #ifdef __OPTIMIZE__ 306 306 # define __compiletime_assert(condition, msg, prefix, suffix) \ 307 307 do { \ 308 - extern void prefix ## suffix(void) __compiletime_error(msg); \ 308 + /* \ 309 + * __noreturn is needed to give the compiler enough \ 310 + * information to avoid certain possibly-uninitialized \ 311 + * warnings (regardless of the build failing). \ 312 + */ \ 313 + __noreturn extern void prefix ## suffix(void) \ 314 + __compiletime_error(msg); \ 309 315 if (!(condition)) \ 310 316 prefix ## suffix(); \ 311 317 } while (0)