Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
compiler_info.hpp File Reference

Go to the source code of this file.

Macro Definition Documentation

◆ ARENE_COMPILER_ARMCLANG

#define ARENE_COMPILER_ARMCLANG

◆ ARENE_COMPILER_ARMCLANG_I_

#define ARENE_COMPILER_ARMCLANG_I_   ARENE_OFF_BY_DEFAULT

◆ ARENE_COMPILER_CLANG

#define ARENE_COMPILER_CLANG

A compile-time configuration flag for testing if the current compiler is clang.

Usage:

#if ARENE_IS_ON(ARENE_COMPILER_CLANG)

The value of this query is determined as follows, in order of precedence:

  1. If ARENE_COMPILER_CLANG has been explicitly defined via a -D flag to the compiler or similar:
    • ARENE_ON if it is truthy
    • ARENE_OFF if it is not truthy.
  1. If __clang__ is defined, it is ARENE_ON_BY_DEFAULT
  1. Otherwise, it is ARENE_OFF_BY_DEFAULT

◆ ARENE_COMPILER_CLANG_I_

#define ARENE_COMPILER_CLANG_I_   ARENE_OFF_BY_DEFAULT

◆ ARENE_COMPILER_GCC

#define ARENE_COMPILER_GCC

A compile-time configuration flag for testing if the current compiler is gcc.

Usage:

#if ARENE_IS_ON(ARENE_COMPILER_GCC)

The value of this query is determined as follows, in order of precedence:

  1. If ARENE_COMPILER_GCC has been explicitly defined via a -D flag to the compiler or similar:
    • ARENE_ON if it is truthy
    • ARENE_OFF if it is not truthy.
  1. If ARENE_IS_OFF(ARENE_COMPILER_CLANG) , and all of __GNUC__ , __GNUC_MINOR__ and __GNUC_PATCH_LEVEL are defined, it is ARENE_ON_BY_DEFAULT
  1. Otherwise, it is ARENE_OFF_BY_DEFAULT

◆ ARENE_COMPILER_GCC_I_

#define ARENE_COMPILER_GCC_I_   ARENE_OFF_BY_DEFAULT