fix shitty attributes
This commit is contained in:
@@ -14,18 +14,10 @@
|
|||||||
#define __format(like, ...) gnu::format(like, __VA_ARGS__)
|
#define __format(like, ...) gnu::format(like, __VA_ARGS__)
|
||||||
#define __always_inline gnu::always_inline
|
#define __always_inline gnu::always_inline
|
||||||
#define __visibility gnu::visibility
|
#define __visibility gnu::visibility
|
||||||
|
#define __pure gnu::pure
|
||||||
// TODO: Workaround for clang which doesn't have these C23 standard attributes yet.
|
|
||||||
#if !__has_c_attribute(unsequenced)
|
|
||||||
#define unsequenced gnu::const
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !__has_c_attribute(reproducible)
|
|
||||||
#define reproducible gnu::pure
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Only clang has these hints, GCC would throw a warning here.
|
// Only clang has these hints, GCC would throw a warning here.
|
||||||
// clang::noderef also don't support the C23 attribute format.
|
// clang::noderef also doesn't support the C23 attribute format.
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#define __user __attribute__((noderef, address_space(1)))
|
#define __user __attribute__((noderef, address_space(1)))
|
||||||
#define __phys __attribute__((noderef, address_space(2)))
|
#define __phys __attribute__((noderef, address_space(2)))
|
||||||
|
|||||||
Reference in New Issue
Block a user