/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __LINUX_COMPILER_TYPES_H #error"Please do not include directly, include instead." #endif
/* * Common definitions for all gcc versions go here.
*/ #define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
/* * This macro obfuscates arithmetic on a variable address so that gcc * shouldn't recognize the original var, and make assumptions about it. * * This is needed because the C standard makes it undefined to do * pointer arithmetic on "objects" outside their boundaries and the * gcc optimizers assume this is the case. In particular they * assume such arithmetic does not wrap. * * A miscompilation has been observed because of this on PPC. * To work around it we hide the relationship of the pointer and the object * using this macro. * * Versions of the ppc64 compiler before 4.1 had a bug where use of * RELOC_HIDE could trash r30. The bug can be worked around by changing * the inline assembly constraint from =g to =r, in this particular * case either is valid.
*/ #define RELOC_HIDE(ptr, off) \
({ \ unsignedlong __ptr; \
__asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
(typeof(ptr)) (__ptr + (off)); \
})
/* * calling noreturn functions, __builtin_unreachable() and __builtin_trap() * confuse the stack allocation in gcc, leading to overly large stack * frames, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365 * * Adding an empty inline assembly before it works around the problem
*/ #define barrier_before_unreachable() asmvolatile("")
/* * Only supported since gcc >= 12
*/ #ifdefined(CONFIG_KCOV) && __has_attribute(__no_sanitize_coverage__) #define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__)) #else #define __no_sanitize_coverage #endif
/* * Treat __SANITIZE_HWADDRESS__ the same as __SANITIZE_ADDRESS__ in the kernel, * matching the defines used by Clang.
*/ #ifdef __SANITIZE_HWADDRESS__ #define __SANITIZE_ADDRESS__ #endif
/* * GCC does not support KMSAN.
*/ #define __no_sanitize_memory #define __no_kmsan_checks
/* * Turn individual warnings and errors on and off locally, depending * on version.
*/ #define __diag_GCC(version, severity, s) \
__diag_GCC_ ## version(__diag_GCC_ ## severity s)
/* Severity used in pragma directives */ #define __diag_GCC_ignore ignored #define __diag_GCC_warn warning #define __diag_GCC_error error
/* * Prior to 9.1, -Wno-alloc-size-larger-than (and therefore the "alloc_size" * attribute) do not work, and must be disabled.
*/ #if GCC_VERSION < 90100 #undef __alloc_size__ #endif
/* * Declare compiler support for __typeof_unqual__() operator. * * Bindgen uses LLVM even if our C compiler is GCC, so we cannot * rely on the auto-detected CONFIG_CC_HAS_TYPEOF_UNQUAL.
*/ #define CC_HAS_TYPEOF_UNQUAL (__GNUC__ >= 14)
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.