mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-17 20:31:24 +00:00
Compiler Attributes: homogenize __must_be_array
Different definitions of __must_be_array: * gcc: disabled for __CHECKER__ * clang: same definition as gcc's, but without __CHECKER__ * intel: the comment claims __builtin_types_compatible_p() is unsupported; but icc seems to support it since 13.0.1 (released in 2012). See https://godbolt.org/z/S0l6QQ Therefore, we can remove all of them and have a single definition in compiler.h Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
This commit is contained in:
parent
c2c640aa04
commit
ec0bbef66f
4 changed files with 7 additions and 11 deletions
|
@ -41,6 +41,5 @@
|
|||
* compilers, like ICC.
|
||||
*/
|
||||
#define barrier() __asm__ __volatile__("" : : : "memory")
|
||||
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||
#define __assume_aligned(a, ...) \
|
||||
__attribute__((__assume_aligned__(a, ## __VA_ARGS__)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue