Zephyr Project API  3.3.0
A Scalable Open Source RTOS
toolchain.h File Reference

Macros to abstract toolchain specific capabilities. More...

Go to the source code of this file.

Macros

#define HAS_BUILTIN(x)   HAS_BUILTIN_##x
 Check if the compiler supports the built-in function x. More...
 
#define TOOLCHAIN_GCC_VERSION   0
 GCC version in xxyyzz for xx.yy.zz. Zero if not GCC compatible. More...
 
#define TOOLCHAIN_CLANG_VERSION   0
 Clang version in xxyyzz for xx.yy.zz. Zero if not Clang compatible. More...
 
#define TOOLCHAIN_HAS_PRAGMA_DIAG   0
 Indicate if toolchain supports #pragma diagnostics. More...
 
#define TOOLCHAIN_HAS_C_GENERIC   0
 Indicate if toolchain supports C Generic. More...
 
#define TOOLCHAIN_HAS_C_AUTO_TYPE   0
 Indicate if toolchain supports C __auto_type. More...
 

Detailed Description

Macros to abstract toolchain specific capabilities.

This file contains various macros to abstract compiler capabilities that utilize toolchain specific attributes and/or pragmas.

Macro Definition Documentation

◆ HAS_BUILTIN

#define HAS_BUILTIN (   x)    HAS_BUILTIN_##x

Check if the compiler supports the built-in function x.

This macro is for use with conditional compilation to enable code using a builtin function that may not be available in every compiler.

◆ TOOLCHAIN_CLANG_VERSION

#define TOOLCHAIN_CLANG_VERSION   0

Clang version in xxyyzz for xx.yy.zz. Zero if not Clang compatible.

◆ TOOLCHAIN_GCC_VERSION

#define TOOLCHAIN_GCC_VERSION   0

GCC version in xxyyzz for xx.yy.zz. Zero if not GCC compatible.

◆ TOOLCHAIN_HAS_C_AUTO_TYPE

#define TOOLCHAIN_HAS_C_AUTO_TYPE   0

Indicate if toolchain supports C __auto_type.

◆ TOOLCHAIN_HAS_C_GENERIC

#define TOOLCHAIN_HAS_C_GENERIC   0

Indicate if toolchain supports C Generic.

◆ TOOLCHAIN_HAS_PRAGMA_DIAG

#define TOOLCHAIN_HAS_PRAGMA_DIAG   0

Indicate if toolchain supports #pragma diagnostics.