Loading...
Searching...
No Matches
Go to the documentation of this file.
2#ifndef __LINUX_COMPILER_TYPES_H
3#error "Please do not include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
9#define GCC_VERSION (__GNUC__ * 10000 \
10 + __GNUC_MINOR__ * 100 \
11 + __GNUC_PATCHLEVEL__)
31#define RELOC_HIDE(ptr, off) \
33 unsigned long __ptr; \
34 __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
35 (typeof(ptr)) (__ptr + (off)); \
38#if defined(LATENT_ENTROPY_PLUGIN) && !defined(__CHECKER__)
39#define __latent_entropy __attribute__((latent_entropy))
49#define barrier_before_unreachable() asm volatile("")
51#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP)
52#define __HAVE_BUILTIN_BSWAP32__
53#define __HAVE_BUILTIN_BSWAP64__
54#define __HAVE_BUILTIN_BSWAP16__
57#if GCC_VERSION >= 70000
58#define KASAN_ABI_VERSION 5
60#define KASAN_ABI_VERSION 4
63#ifdef CONFIG_SHADOW_CALL_STACK
64#define __noscs __attribute__((__no_sanitize__("shadow-call-stack")))
67#ifdef __SANITIZE_HWADDRESS__
68#define __no_sanitize_address __attribute__((__no_sanitize__("hwaddress")))
70#define __no_sanitize_address __attribute__((__no_sanitize_address__))
73#if defined(__SANITIZE_THREAD__)
74#define __no_sanitize_thread __attribute__((__no_sanitize_thread__))
76#define __no_sanitize_thread
79#define __no_sanitize_undefined __attribute__((__no_sanitize_undefined__))
84#if defined(CONFIG_KCOV) && __has_attribute(__no_sanitize_coverage__)
85#define __no_sanitize_coverage __attribute__((__no_sanitize_coverage__))
87#define __no_sanitize_coverage
94#ifdef __SANITIZE_HWADDRESS__
95#define __SANITIZE_ADDRESS__
101#define __no_sanitize_memory
102#define __no_kmsan_checks
108#define __diag_GCC(version, severity, s) \
109 __diag_GCC_ ## version(__diag_GCC_ ## severity s)
112#define __diag_GCC_ignore ignored
113#define __diag_GCC_warn warning
114#define __diag_GCC_error error
116#define __diag_str1(s) #s
117#define __diag_str(s) __diag_str1(s)
118#define __diag(s) _Pragma(__diag_str(GCC diagnostic s))
120#if GCC_VERSION >= 80000
121#define __diag_GCC_8(s) __diag(s)
123#define __diag_GCC_8(s)
126#define __diag_GCC_all(s) __diag(s)
128#define __diag_ignore_all(option, comment) \
129 __diag(__diag_GCC_ignore option)
135#if GCC_VERSION < 90100
145#define CC_HAS_TYPEOF_UNQUAL (__GNUC__ >= 14)