ZeroErr
Loading...
Searching...
No Matches
config.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ZEROERR_VERSION_MAJOR   0
#define ZEROERR_VERSION_MINOR   5
#define ZEROERR_VERSION_PATCH   0
#define ZEROERR_VERSION    (ZEROERR_VERSION_MAJOR * 10000 + ZEROERR_VERSION_MINOR * 100 + ZEROERR_VERSION_PATCH)
#define ZEROERR_STR(x)
#define ZEROERR_VERSION_STR_BUILDER(a, b, c)
#define ZEROERR_VERSION_STR    ZEROERR_VERSION_STR_BUILDER(ZEROERR_VERSION_MAJOR, ZEROERR_VERSION_MINOR, ZEROERR_VERSION_PATCH)
#define ZEROERR_CPLUSPLUS   __cplusplus
#define ZEROERR_OS_UNKNOWN
#define ZEROERR_CAT_IMPL(s1, s2)
#define ZEROERR_CAT(x, s)
#define ZEROERR_ARG16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...)
#define ZEROERR_HAS_COMMA(...)
#define ZEROERR_TRIGGER_PARENTHESIS_(...)
#define ZEROERR_ISEMPTY(...)
#define ZEROERR_PASTE5(_0, _1, _2, _3, _4)
#define _ZEROERR_ISEMPTY(_0, _1, _2, _3)
#define _IS_EMPTY_CASE_0001   ,
#define ZEROERR_NAMEGEN(x)
#define ZEROERR_FUNC_SCOPE_BEGIN   [&]
#define ZEROERR_FUNC_SCOPE_END   ()
#define ZEROERR_FUNC_SCOPE_RET(v)
#define ZEROERR_USE_SHORT_LOG_MACRO
#define ZEROERR_EXPAND(x)
#define ZEROERR_COMPILER(MAJOR, MINOR, PATCH)
#define ZEROERR_MSVC   0
#define ZEROERR_CLANG   0
#define ZEROERR_GCC   0
#define ZEROERR_ICC   0
#define ZEROERR_CLANG_SUPPRESS_WARNING_PUSH
#define ZEROERR_CLANG_SUPPRESS_WARNING(w)
#define ZEROERR_CLANG_SUPPRESS_WARNING_POP
#define ZEROERR_CLANG_SUPPRESS_WARNING_WITH_PUSH(w)
#define ZEROERR_GCC_SUPPRESS_WARNING_PUSH
#define ZEROERR_GCC_SUPPRESS_WARNING(w)
#define ZEROERR_GCC_SUPPRESS_WARNING_POP
#define ZEROERR_GCC_SUPPRESS_WARNING_WITH_PUSH(w)
#define ZEROERR_MSVC_SUPPRESS_WARNING_PUSH
#define ZEROERR_MSVC_SUPPRESS_WARNING(w)
#define ZEROERR_MSVC_SUPPRESS_WARNING_POP
#define ZEROERR_MSVC_SUPPRESS_WARNING_WITH_PUSH(w)
#define ZEROERR_CLANG_SUPPRESS_VARIADIC_OMITTED
#define ZEROERR_SUPPRESS_COMMON_WARNINGS_PUSH
#define ZEROERR_SUPPRESS_COMMON_WARNINGS_POP
#define ZEROERR_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN
#define ZEROERR_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END   ZEROERR_MSVC_SUPPRESS_WARNING_POP
#define ZEROERR_SUPPRESS_VARIADIC_MACRO
#define ZEROERR_SUPPRESS_VARIADIC_MACRO_POP   ZEROERR_CLANG_SUPPRESS_WARNING_POP
#define ZEROERR_SUPPRESS_COMPARE
#define ZEROERR_SUPPRESS_COMPARE_POP
#define ZEROERR_UNUSED(x)

Macro Definition Documentation

◆ _IS_EMPTY_CASE_0001

#define _IS_EMPTY_CASE_0001   ,

◆ _ZEROERR_ISEMPTY

#define _ZEROERR_ISEMPTY ( _0,
_1,
_2,
_3 )
Value:
ZEROERR_HAS_COMMA(ZEROERR_PASTE5(_IS_EMPTY_CASE_, _0, _1, _2, _3))
#define ZEROERR_HAS_COMMA(...)
Definition config.h:85
#define ZEROERR_PASTE5(_0, _1, _2, _3, _4)
Definition config.h:100

◆ ZEROERR_ARG16

#define ZEROERR_ARG16 ( _0,
_1,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
_10,
_11,
_12,
_13,
_14,
_15,
... )
Value:
_15

◆ ZEROERR_CAT

#define ZEROERR_CAT ( x,
s )
Value:
#define ZEROERR_CAT_IMPL(s1, s2)
Definition config.h:79

◆ ZEROERR_CAT_IMPL

#define ZEROERR_CAT_IMPL ( s1,
s2 )
Value:
s1##s2

◆ ZEROERR_CLANG

#define ZEROERR_CLANG   0

◆ ZEROERR_CLANG_SUPPRESS_VARIADIC_OMITTED

#define ZEROERR_CLANG_SUPPRESS_VARIADIC_OMITTED

◆ ZEROERR_CLANG_SUPPRESS_WARNING

#define ZEROERR_CLANG_SUPPRESS_WARNING ( w)

◆ ZEROERR_CLANG_SUPPRESS_WARNING_POP

#define ZEROERR_CLANG_SUPPRESS_WARNING_POP

◆ ZEROERR_CLANG_SUPPRESS_WARNING_PUSH

#define ZEROERR_CLANG_SUPPRESS_WARNING_PUSH

◆ ZEROERR_CLANG_SUPPRESS_WARNING_WITH_PUSH

#define ZEROERR_CLANG_SUPPRESS_WARNING_WITH_PUSH ( w)

◆ ZEROERR_COMPILER

#define ZEROERR_COMPILER ( MAJOR,
MINOR,
PATCH )
Value:
((MAJOR) * 10000000 + (MINOR) * 100000 + (PATCH))

◆ ZEROERR_CPLUSPLUS

#define ZEROERR_CPLUSPLUS   __cplusplus

◆ ZEROERR_EXPAND

#define ZEROERR_EXPAND ( x)
Value:
x

◆ ZEROERR_FUNC_SCOPE_BEGIN

#define ZEROERR_FUNC_SCOPE_BEGIN   [&]

◆ ZEROERR_FUNC_SCOPE_END

#define ZEROERR_FUNC_SCOPE_END   ()

◆ ZEROERR_FUNC_SCOPE_RET

#define ZEROERR_FUNC_SCOPE_RET ( v)
Value:
return v

◆ ZEROERR_GCC

#define ZEROERR_GCC   0

◆ ZEROERR_GCC_SUPPRESS_WARNING

#define ZEROERR_GCC_SUPPRESS_WARNING ( w)

◆ ZEROERR_GCC_SUPPRESS_WARNING_POP

#define ZEROERR_GCC_SUPPRESS_WARNING_POP

◆ ZEROERR_GCC_SUPPRESS_WARNING_PUSH

#define ZEROERR_GCC_SUPPRESS_WARNING_PUSH

◆ ZEROERR_GCC_SUPPRESS_WARNING_WITH_PUSH

#define ZEROERR_GCC_SUPPRESS_WARNING_WITH_PUSH ( w)

◆ ZEROERR_HAS_COMMA

#define ZEROERR_HAS_COMMA ( ...)
Value:
ZEROERR_ARG16(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
#define ZEROERR_ARG16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15,...)
Definition config.h:84

◆ ZEROERR_ICC

#define ZEROERR_ICC   0

◆ ZEROERR_ISEMPTY

#define ZEROERR_ISEMPTY ( ...)
Value:
ZEROERR_SUPPRESS_VARIADIC_MACRO \
_ZEROERR_ISEMPTY(/* test if there is just one argument, eventually an empty \
one */ \
ZEROERR_HAS_COMMA(__VA_ARGS__), /* test if ZEROERR_TRIGGER_PARENTHESIS_ \
together with the argument adds a comma */ \
__VA_ARGS__), /* test if the argument together with \
a parenthesis adds a comma */ \
ZEROERR_HAS_COMMA(__VA_ARGS__( \
/*empty*/)), /* test if placing it between ZEROERR_TRIGGER_PARENTHESIS_ \
and the parenthesis adds a comma */ \
#define ZEROERR_SUPPRESS_VARIADIC_MACRO_POP
Definition config.h:316
#define ZEROERR_TRIGGER_PARENTHESIS_(...)
Definition config.h:87

◆ ZEROERR_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN

#define ZEROERR_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN
Value:
ZEROERR_MSVC_SUPPRESS_WARNING_PUSH \
ZEROERR_MSVC_SUPPRESS_WARNING(4548) /* before comma no effect; expected side - effect */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4265) /* virtual functions, but destructor is not virtual */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4986) /* exception specification does not match previous */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4350) /* 'member1' called instead of 'member2' */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4668) /* not defined as a preprocessor macro */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4365) /* signed/unsigned mismatch */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4774) /* format string not a string literal */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4820) /* padding */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4625) /* copy constructor was implicitly deleted */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4626) /* assignment operator was implicitly deleted */ \
ZEROERR_MSVC_SUPPRESS_WARNING(5027) /* move assignment operator implicitly deleted */ \
ZEROERR_MSVC_SUPPRESS_WARNING(5026) /* move constructor was implicitly deleted */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4623) /* default constructor was implicitly deleted */ \
ZEROERR_MSVC_SUPPRESS_WARNING(5039) /* pointer to pot. throwing function passed to extern C */ \
ZEROERR_MSVC_SUPPRESS_WARNING(5045) /* Spectre mitigation for memory load */ \
ZEROERR_MSVC_SUPPRESS_WARNING(5105) /* macro producing 'defined' has undefined behavior */ \
ZEROERR_MSVC_SUPPRESS_WARNING(4738) /* storing float result in memory, loss of performance */ \
ZEROERR_MSVC_SUPPRESS_WARNING(5262) /* implicit fall-through */

◆ ZEROERR_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END

#define ZEROERR_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END   ZEROERR_MSVC_SUPPRESS_WARNING_POP

◆ ZEROERR_MSVC

#define ZEROERR_MSVC   0

◆ ZEROERR_MSVC_SUPPRESS_WARNING

#define ZEROERR_MSVC_SUPPRESS_WARNING ( w)

◆ ZEROERR_MSVC_SUPPRESS_WARNING_POP

#define ZEROERR_MSVC_SUPPRESS_WARNING_POP

◆ ZEROERR_MSVC_SUPPRESS_WARNING_PUSH

#define ZEROERR_MSVC_SUPPRESS_WARNING_PUSH

◆ ZEROERR_MSVC_SUPPRESS_WARNING_WITH_PUSH

#define ZEROERR_MSVC_SUPPRESS_WARNING_WITH_PUSH ( w)

◆ ZEROERR_NAMEGEN

#define ZEROERR_NAMEGEN ( x)
Value:
ZEROERR_CAT(x, __LINE__)
#define ZEROERR_CAT(x, s)
Definition config.h:80

◆ ZEROERR_OS_UNKNOWN

#define ZEROERR_OS_UNKNOWN

◆ ZEROERR_PASTE5

#define ZEROERR_PASTE5 ( _0,
_1,
_2,
_3,
_4 )
Value:
_0##_1##_2##_3##_4

◆ ZEROERR_STR

#define ZEROERR_STR ( x)
Value:
#x

◆ ZEROERR_SUPPRESS_COMMON_WARNINGS_POP

#define ZEROERR_SUPPRESS_COMMON_WARNINGS_POP
Value:
ZEROERR_CLANG_SUPPRESS_WARNING_POP \
ZEROERR_GCC_SUPPRESS_WARNING_POP \
ZEROERR_MSVC_SUPPRESS_WARNING_POP

◆ ZEROERR_SUPPRESS_COMMON_WARNINGS_PUSH

#define ZEROERR_SUPPRESS_COMMON_WARNINGS_PUSH

◆ ZEROERR_SUPPRESS_COMPARE

#define ZEROERR_SUPPRESS_COMPARE
Value:
ZEROERR_CLANG_SUPPRESS_WARNING_PUSH \
ZEROERR_CLANG_SUPPRESS_WARNING("-Wsign-conversion") \
ZEROERR_CLANG_SUPPRESS_WARNING("-Wsign-compare") \
ZEROERR_CLANG_SUPPRESS_WARNING("-Wgnu-zero-variadic-macro-arguments") \
ZEROERR_GCC_SUPPRESS_WARNING_PUSH \
ZEROERR_GCC_SUPPRESS_WARNING("-Wsign-conversion") \
ZEROERR_GCC_SUPPRESS_WARNING("-Wsign-compare") \
ZEROERR_MSVC_SUPPRESS_WARNING_PUSH \
ZEROERR_MSVC_SUPPRESS_WARNING(4388) \
ZEROERR_MSVC_SUPPRESS_WARNING(4389) \
ZEROERR_MSVC_SUPPRESS_WARNING(4018)

◆ ZEROERR_SUPPRESS_COMPARE_POP

#define ZEROERR_SUPPRESS_COMPARE_POP
Value:
ZEROERR_CLANG_SUPPRESS_WARNING_POP ZEROERR_GCC_SUPPRESS_WARNING_POP \
ZEROERR_MSVC_SUPPRESS_WARNING_POP
Definition assert.h:224

◆ ZEROERR_SUPPRESS_VARIADIC_MACRO

#define ZEROERR_SUPPRESS_VARIADIC_MACRO
Value:
ZEROERR_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wgnu-zero-variadic-macro-arguments") \
#define ZEROERR_CLANG_SUPPRESS_WARNING_WITH_PUSH(w)
Definition config.h:188
#define ZEROERR_CLANG_SUPPRESS_VARIADIC_OMITTED
Definition config.h:224

◆ ZEROERR_SUPPRESS_VARIADIC_MACRO_POP

#define ZEROERR_SUPPRESS_VARIADIC_MACRO_POP   ZEROERR_CLANG_SUPPRESS_WARNING_POP

◆ ZEROERR_TRIGGER_PARENTHESIS_

#define ZEROERR_TRIGGER_PARENTHESIS_ ( ...)
Value:
,

◆ ZEROERR_UNUSED

#define ZEROERR_UNUSED ( x)
Value:
x

Macro to suppress unused variable/parameter warnings

This macro can be used to mark variables or parameters as intentionally unused while maintaining cross-compiler compatibility. It handles different compiler-specific attributes and warning suppressions:

  • For Clang/GCC: Uses attribute((unused))
  • For LCLINT: Uses @unused@ comment annotation
  • For MSVC: Suppresses warning C4100 (unreferenced formal parameter)
  • For other compilers: No special handling

Usage example: void foo(ZEROERR_UNUSED(int x)) { // x is marked as intentionally unused }

◆ ZEROERR_USE_SHORT_LOG_MACRO

#define ZEROERR_USE_SHORT_LOG_MACRO

◆ ZEROERR_VERSION

#define ZEROERR_VERSION    (ZEROERR_VERSION_MAJOR * 10000 + ZEROERR_VERSION_MINOR * 100 + ZEROERR_VERSION_PATCH)

◆ ZEROERR_VERSION_MAJOR

#define ZEROERR_VERSION_MAJOR   0

◆ ZEROERR_VERSION_MINOR

#define ZEROERR_VERSION_MINOR   5

◆ ZEROERR_VERSION_PATCH

#define ZEROERR_VERSION_PATCH   0

◆ ZEROERR_VERSION_STR

◆ ZEROERR_VERSION_STR_BUILDER

#define ZEROERR_VERSION_STR_BUILDER ( a,
b,
c )
Value:
#define ZEROERR_STR(x)
Definition config.h:9