Compiler Identification
include/compiler/name.h View source View on GitHubcn_* “Compiler Name”, cn_id_* “Compiler Identity”
Macros
Section titled “Macros”cn_has_builtin
Section titled “cn_has_builtin”#define cn_has_builtin(x) source Expansion
#define cn_has_builtin(x) __has_builtin(x) cn_has_builtin
Section titled “cn_has_builtin”#define cn_has_builtin(x) source Expansion
#define cn_has_builtin(x) 0 cn_has_attribute
Section titled “cn_has_attribute”#define cn_has_attribute(x) source Expansion
#define cn_has_attribute(x) __has_attribute(x) cn_has_attribute
Section titled “cn_has_attribute”#define cn_has_attribute(x) source Expansion
#define cn_has_attribute(x) 0 cn_has_feature
Section titled “cn_has_feature”#define cn_has_feature(x) source Expansion
#define cn_has_feature(x) __has_feature(x) cn_has_feature
Section titled “cn_has_feature”#define cn_has_feature(x) source Expansion
#define cn_has_feature(x) 0 cn_has_extension
Section titled “cn_has_extension”#define cn_has_extension(x) source Expansion
#define cn_has_extension(x) __has_extension(x) cn_has_extension
Section titled “cn_has_extension”#define cn_has_extension(x) source Expansion
#define cn_has_extension(x) 0 cn_has_warning
Section titled “cn_has_warning”#define cn_has_warning(x) source Expansion
#define cn_has_warning(x) __has_warning(x) cn_has_warning
Section titled “cn_has_warning”#define cn_has_warning(x) source Expansion
#define cn_has_warning(x) 0 cn_has_include
Section titled “cn_has_include”#define cn_has_include(x) source Expansion
#define cn_has_include(x) __has_include(x) cn_has_include
Section titled “cn_has_include”#define cn_has_include(x) source Expansion
#define cn_has_include(x) 0 cn_id_clang
Section titled “cn_id_clang”#define cn_id_clang source cn_id_clang_major
Section titled “cn_id_clang_major”#define cn_id_clang_major __clang_major__ source cn_id_clang_minor
Section titled “cn_id_clang_minor”#define cn_id_clang_minor __clang_minor__ source cn_id_clang_patch
Section titled “cn_id_clang_patch”#define cn_id_clang_patch __clang_patchlevel__ source cn_id_clang_version
Section titled “cn_id_clang_version”#define cn_id_clang_version source Expansion
#define cn_id_clang_version \
((__clang_major__ * 10000) + (__clang_minor__ * 100) + __clang_patchlevel__) cn_id_gcc
Section titled “cn_id_gcc”#define cn_id_gcc source cn_id_gcc_major
Section titled “cn_id_gcc_major”#define cn_id_gcc_major __GNUC__ source cn_id_gcc_minor
Section titled “cn_id_gcc_minor”#define cn_id_gcc_minor __GNUC_MINOR__ source cn_id_gcc_patch
Section titled “cn_id_gcc_patch”#define cn_id_gcc_patch __GNUC_PATCHLEVEL__ source cn_id_gcc_version
Section titled “cn_id_gcc_version”#define cn_id_gcc_version source Expansion
#define cn_id_gcc_version \
((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) cn_id_clang_at_least
Section titled “cn_id_clang_at_least”#define cn_id_clang_at_least(maj, min) source Expansion
#define cn_id_clang_at_least(maj, min) \
((cn_id_clang_major > (maj)) || \
(cn_id_clang_major == (maj) && cn_id_clang_minor >= (min))) cn_id_clang_at_least
Section titled “cn_id_clang_at_least”#define cn_id_clang_at_least(maj, min) source Expansion
#define cn_id_clang_at_least(maj, min) 0 cn_id_gcc_at_least
Section titled “cn_id_gcc_at_least”#define cn_id_gcc_at_least(maj, min) source Expansion
#define cn_id_gcc_at_least(maj, min) \
((cn_id_gcc_major > (maj)) || \
(cn_id_gcc_major == (maj) && cn_id_gcc_minor >= (min))) cn_id_gcc_at_least
Section titled “cn_id_gcc_at_least”#define cn_id_gcc_at_least(maj, min) source Expansion
#define cn_id_gcc_at_least(maj, min) 0 cn_id_name
Section titled “cn_id_name”#define cn_id_name "Clang" source cn_id_name
Section titled “cn_id_name”#define cn_id_name "GCC" source cn_id_name
Section titled “cn_id_name”#define cn_id_name "Unknown" source