JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce_CompilerWarnings.h File Reference
Include dependency graph for juce_CompilerWarnings.h:
This graph shows which files directly or indirectly include this file:

Macros

#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE(...)   JUCE_PUSH_WARNINGS_GCC_LIKE(GCC, __VA_ARGS__)
 Push/pop warnings on compilers with gcc-like warning flags. More...
 
#define JUCE_BEGIN_IGNORE_WARNINGS_LEVEL_MSVC(level, warnings)
 
#define JUCE_BEGIN_IGNORE_WARNINGS_MSVC(warnings)
 
#define JUCE_BEGIN_NO_SANITIZE(warnings)
 Disable sanitizers for a range of functions. More...
 
#define JUCE_CONCAT(a, b)   JUCE_CONCAT_(a, b)
 
#define JUCE_CONCAT_(a, b)   a##b
 Concatenate two tokens to form a new token. More...
 
#define JUCE_EACH(FN, ...)
 Apply the macro FN to each of the other arguments. More...
 
#define JUCE_EACH_00_(FN)
 
#define JUCE_EACH_01_(FN, X)   FN(X)
 
#define JUCE_EACH_02_(FN, X, ...)   FN(X) JUCE_EACH_01_(FN, __VA_ARGS__)
 
#define JUCE_EACH_03_(FN, X, ...)   FN(X) JUCE_EACH_02_(FN, __VA_ARGS__)
 
#define JUCE_EACH_04_(FN, X, ...)   FN(X) JUCE_EACH_03_(FN, __VA_ARGS__)
 
#define JUCE_EACH_05_(FN, X, ...)   FN(X) JUCE_EACH_04_(FN, __VA_ARGS__)
 
#define JUCE_EACH_06_(FN, X, ...)   FN(X) JUCE_EACH_05_(FN, __VA_ARGS__)
 
#define JUCE_EACH_07_(FN, X, ...)   FN(X) JUCE_EACH_06_(FN, __VA_ARGS__)
 
#define JUCE_EACH_08_(FN, X, ...)   FN(X) JUCE_EACH_07_(FN, __VA_ARGS__)
 
#define JUCE_EACH_09_(FN, X, ...)   FN(X) JUCE_EACH_08_(FN, __VA_ARGS__)
 
#define JUCE_EACH_10_(FN, X, ...)   FN(X) JUCE_EACH_09_(FN, __VA_ARGS__)
 
#define JUCE_EACH_11_(FN, X, ...)   FN(X) JUCE_EACH_10_(FN, __VA_ARGS__)
 
#define JUCE_EACH_12_(FN, X, ...)   FN(X) JUCE_EACH_11_(FN, __VA_ARGS__)
 
#define JUCE_EACH_13_(FN, X, ...)   FN(X) JUCE_EACH_12_(FN, __VA_ARGS__)
 
#define JUCE_EACH_14_(FN, X, ...)   FN(X) JUCE_EACH_13_(FN, __VA_ARGS__)
 
#define JUCE_EACH_15_(FN, X, ...)   FN(X) JUCE_EACH_14_(FN, __VA_ARGS__)
 
#define JUCE_EACH_16_(FN, X, ...)   FN(X) JUCE_EACH_15_(FN, __VA_ARGS__)
 
#define JUCE_EACH_17_(FN, X, ...)   FN(X) JUCE_EACH_16_(FN, __VA_ARGS__)
 
#define JUCE_EACH_18_(FN, X, ...)   FN(X) JUCE_EACH_17_(FN, __VA_ARGS__)
 
#define JUCE_EACH_19_(FN, X, ...)   FN(X) JUCE_EACH_18_(FN, __VA_ARGS__)
 
#define JUCE_EACH_20_(FN, X, ...)   FN(X) JUCE_EACH_19_(FN, __VA_ARGS__)
 
#define JUCE_EACH_21_(FN, X, ...)   FN(X) JUCE_EACH_20_(FN, __VA_ARGS__)
 
#define JUCE_EACH_22_(FN, X, ...)   FN(X) JUCE_EACH_21_(FN, __VA_ARGS__)
 
#define JUCE_EACH_23_(FN, X, ...)   FN(X) JUCE_EACH_22_(FN, __VA_ARGS__)
 
#define JUCE_EACH_24_(FN, X, ...)   FN(X) JUCE_EACH_23_(FN, __VA_ARGS__)
 
#define JUCE_EACH_25_(FN, X, ...)   FN(X) JUCE_EACH_24_(FN, __VA_ARGS__)
 
#define JUCE_EACH_26_(FN, X, ...)   FN(X) JUCE_EACH_25_(FN, __VA_ARGS__)
 
#define JUCE_EACH_27_(FN, X, ...)   FN(X) JUCE_EACH_26_(FN, __VA_ARGS__)
 
#define JUCE_EACH_28_(FN, X, ...)   FN(X) JUCE_EACH_27_(FN, __VA_ARGS__)
 
#define JUCE_EACH_29_(FN, X, ...)   FN(X) JUCE_EACH_28_(FN, __VA_ARGS__)
 
#define JUCE_EACH_30_(FN, X, ...)   FN(X) JUCE_EACH_29_(FN, __VA_ARGS__)
 
#define JUCE_EACH_31_(FN, X, ...)   FN(X) JUCE_EACH_30_(FN, __VA_ARGS__)
 
#define JUCE_EACH_32_(FN, X, ...)   FN(X) JUCE_EACH_31_(FN, __VA_ARGS__)
 
#define JUCE_EACH_33_(FN, X, ...)   FN(X) JUCE_EACH_32_(FN, __VA_ARGS__)
 
#define JUCE_EACH_34_(FN, X, ...)   FN(X) JUCE_EACH_33_(FN, __VA_ARGS__)
 
#define JUCE_EACH_35_(FN, X, ...)   FN(X) JUCE_EACH_34_(FN, __VA_ARGS__)
 
#define JUCE_EACH_36_(FN, X, ...)   FN(X) JUCE_EACH_35_(FN, __VA_ARGS__)
 
#define JUCE_EACH_37_(FN, X, ...)   FN(X) JUCE_EACH_36_(FN, __VA_ARGS__)
 
#define JUCE_EACH_38_(FN, X, ...)   FN(X) JUCE_EACH_37_(FN, __VA_ARGS__)
 
#define JUCE_EACH_39_(FN, X, ...)   FN(X) JUCE_EACH_38_(FN, __VA_ARGS__)
 
#define JUCE_END_IGNORE_WARNINGS_GCC_LIKE   JUCE_POP_WARNINGS_GCC_LIKE(GCC)
 
#define JUCE_END_IGNORE_WARNINGS_MSVC
 
#define JUCE_END_NO_SANITIZE
 
#define JUCE_IGNORE_clang(warning)   JUCE_IGNORE_GCC_LIKE(clang, warning)
 
#define JUCE_IGNORE_GCC(warning)   JUCE_IGNORE_GCC_LIKE(GCC, warning)
 Ignore GCC/clang-specific warnings. More...
 
#define JUCE_IGNORE_GCC_IMPL_(compiler, warning)
 
#define JUCE_IGNORE_GCC_IMPL_0(compiler, warning)
 
#define JUCE_IGNORE_GCC_IMPL_1(compiler, warning)   _Pragma(JUCE_TO_STRING(compiler diagnostic ignored warning))
 
#define JUCE_IGNORE_GCC_LIKE(compiler, warning)   JUCE_IGNORE_GCC_IMPL_1(compiler, warning)
 If 'warning' is recognised by this compiler, ignore it. More...
 
#define JUCE_IGNORE_MSVC(warnings)
 Push/pop warnings on MSVC. More...
 
#define JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, ...)
 
#define JUCE_NTH_ARG_(_00, _01, _02, _03, _04, _05, _06, _07, _08, _09, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, N, ...)   N
 Return the Nth argument. More...
 
#define JUCE_POP_WARNINGS_GCC_LIKE(compiler)   _Pragma(JUCE_TO_STRING(compiler diagnostic pop))
 Pop the current warning scope. More...
 
#define JUCE_PUSH_WARNINGS_GCC_LIKE(compiler, ...)   JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, "-Wpragmas", __VA_ARGS__)
 Push a new warning scope, and then ignore each warning for either clang or gcc. More...
 
#define JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION   11
 
#define JUCE_TO_STRING(x)   #x
 Quote the argument, turning it into a string. More...
 

Macro Definition Documentation

◆ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE

#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE (   ...)    JUCE_PUSH_WARNINGS_GCC_LIKE(GCC, __VA_ARGS__)

Push/pop warnings on compilers with gcc-like warning flags.

These macros expand to nothing on other compilers (like MSVC).

◆ JUCE_BEGIN_IGNORE_WARNINGS_LEVEL_MSVC

#define JUCE_BEGIN_IGNORE_WARNINGS_LEVEL_MSVC (   level,
  warnings 
)

◆ JUCE_BEGIN_IGNORE_WARNINGS_MSVC

#define JUCE_BEGIN_IGNORE_WARNINGS_MSVC (   warnings)

◆ JUCE_BEGIN_NO_SANITIZE

#define JUCE_BEGIN_NO_SANITIZE (   warnings)

Disable sanitizers for a range of functions.

This functionality doesn't seem to exist on GCC yet, so at the moment this only works for clang.

◆ JUCE_CONCAT

#define JUCE_CONCAT (   a,
 
)    JUCE_CONCAT_(a, b)

◆ JUCE_CONCAT_

#define JUCE_CONCAT_ (   a,
 
)    a##b

Concatenate two tokens to form a new token.

◆ JUCE_EACH

#define JUCE_EACH (   FN,
  ... 
)

Apply the macro FN to each of the other arguments.

◆ JUCE_EACH_00_

#define JUCE_EACH_00_ (   FN)

◆ JUCE_EACH_01_

#define JUCE_EACH_01_ (   FN,
  X 
)    FN(X)

◆ JUCE_EACH_02_

#define JUCE_EACH_02_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_01_(FN, __VA_ARGS__)

◆ JUCE_EACH_03_

#define JUCE_EACH_03_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_02_(FN, __VA_ARGS__)

◆ JUCE_EACH_04_

#define JUCE_EACH_04_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_03_(FN, __VA_ARGS__)

◆ JUCE_EACH_05_

#define JUCE_EACH_05_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_04_(FN, __VA_ARGS__)

◆ JUCE_EACH_06_

#define JUCE_EACH_06_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_05_(FN, __VA_ARGS__)

◆ JUCE_EACH_07_

#define JUCE_EACH_07_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_06_(FN, __VA_ARGS__)

◆ JUCE_EACH_08_

#define JUCE_EACH_08_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_07_(FN, __VA_ARGS__)

◆ JUCE_EACH_09_

#define JUCE_EACH_09_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_08_(FN, __VA_ARGS__)

◆ JUCE_EACH_10_

#define JUCE_EACH_10_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_09_(FN, __VA_ARGS__)

◆ JUCE_EACH_11_

#define JUCE_EACH_11_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_10_(FN, __VA_ARGS__)

◆ JUCE_EACH_12_

#define JUCE_EACH_12_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_11_(FN, __VA_ARGS__)

◆ JUCE_EACH_13_

#define JUCE_EACH_13_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_12_(FN, __VA_ARGS__)

◆ JUCE_EACH_14_

#define JUCE_EACH_14_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_13_(FN, __VA_ARGS__)

◆ JUCE_EACH_15_

#define JUCE_EACH_15_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_14_(FN, __VA_ARGS__)

◆ JUCE_EACH_16_

#define JUCE_EACH_16_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_15_(FN, __VA_ARGS__)

◆ JUCE_EACH_17_

#define JUCE_EACH_17_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_16_(FN, __VA_ARGS__)

◆ JUCE_EACH_18_

#define JUCE_EACH_18_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_17_(FN, __VA_ARGS__)

◆ JUCE_EACH_19_

#define JUCE_EACH_19_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_18_(FN, __VA_ARGS__)

◆ JUCE_EACH_20_

#define JUCE_EACH_20_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_19_(FN, __VA_ARGS__)

◆ JUCE_EACH_21_

#define JUCE_EACH_21_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_20_(FN, __VA_ARGS__)

◆ JUCE_EACH_22_

#define JUCE_EACH_22_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_21_(FN, __VA_ARGS__)

◆ JUCE_EACH_23_

#define JUCE_EACH_23_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_22_(FN, __VA_ARGS__)

◆ JUCE_EACH_24_

#define JUCE_EACH_24_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_23_(FN, __VA_ARGS__)

◆ JUCE_EACH_25_

#define JUCE_EACH_25_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_24_(FN, __VA_ARGS__)

◆ JUCE_EACH_26_

#define JUCE_EACH_26_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_25_(FN, __VA_ARGS__)

◆ JUCE_EACH_27_

#define JUCE_EACH_27_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_26_(FN, __VA_ARGS__)

◆ JUCE_EACH_28_

#define JUCE_EACH_28_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_27_(FN, __VA_ARGS__)

◆ JUCE_EACH_29_

#define JUCE_EACH_29_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_28_(FN, __VA_ARGS__)

◆ JUCE_EACH_30_

#define JUCE_EACH_30_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_29_(FN, __VA_ARGS__)

◆ JUCE_EACH_31_

#define JUCE_EACH_31_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_30_(FN, __VA_ARGS__)

◆ JUCE_EACH_32_

#define JUCE_EACH_32_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_31_(FN, __VA_ARGS__)

◆ JUCE_EACH_33_

#define JUCE_EACH_33_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_32_(FN, __VA_ARGS__)

◆ JUCE_EACH_34_

#define JUCE_EACH_34_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_33_(FN, __VA_ARGS__)

◆ JUCE_EACH_35_

#define JUCE_EACH_35_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_34_(FN, __VA_ARGS__)

◆ JUCE_EACH_36_

#define JUCE_EACH_36_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_35_(FN, __VA_ARGS__)

◆ JUCE_EACH_37_

#define JUCE_EACH_37_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_36_(FN, __VA_ARGS__)

◆ JUCE_EACH_38_

#define JUCE_EACH_38_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_37_(FN, __VA_ARGS__)

◆ JUCE_EACH_39_

#define JUCE_EACH_39_ (   FN,
  X,
  ... 
)    FN(X) JUCE_EACH_38_(FN, __VA_ARGS__)

◆ JUCE_END_IGNORE_WARNINGS_GCC_LIKE

#define JUCE_END_IGNORE_WARNINGS_GCC_LIKE   JUCE_POP_WARNINGS_GCC_LIKE(GCC)

◆ JUCE_END_IGNORE_WARNINGS_MSVC

#define JUCE_END_IGNORE_WARNINGS_MSVC

◆ JUCE_END_NO_SANITIZE

#define JUCE_END_NO_SANITIZE

◆ JUCE_IGNORE_clang

#define JUCE_IGNORE_clang (   warning)    JUCE_IGNORE_GCC_LIKE(clang, warning)

◆ JUCE_IGNORE_GCC

#define JUCE_IGNORE_GCC (   warning)    JUCE_IGNORE_GCC_LIKE(GCC, warning)

Ignore GCC/clang-specific warnings.

◆ JUCE_IGNORE_GCC_IMPL_

#define JUCE_IGNORE_GCC_IMPL_ (   compiler,
  warning 
)

◆ JUCE_IGNORE_GCC_IMPL_0

#define JUCE_IGNORE_GCC_IMPL_0 (   compiler,
  warning 
)

◆ JUCE_IGNORE_GCC_IMPL_1

#define JUCE_IGNORE_GCC_IMPL_1 (   compiler,
  warning 
)    _Pragma(JUCE_TO_STRING(compiler diagnostic ignored warning))

◆ JUCE_IGNORE_GCC_LIKE

#define JUCE_IGNORE_GCC_LIKE (   compiler,
  warning 
)    JUCE_IGNORE_GCC_IMPL_1(compiler, warning)

If 'warning' is recognised by this compiler, ignore it.

◆ JUCE_IGNORE_MSVC

#define JUCE_IGNORE_MSVC (   warnings)

Push/pop warnings on MSVC.

These macros expand to nothing on other compilers (like clang and gcc).

◆ JUCE_IGNORE_WARNINGS_GCC_LIKE

#define JUCE_IGNORE_WARNINGS_GCC_LIKE (   compiler,
  ... 
)
Value:
_Pragma(JUCE_TO_STRING(compiler diagnostic push)) \
JUCE_EACH(JUCE_CONCAT(JUCE_IGNORE_, compiler), __VA_ARGS__)

◆ JUCE_NTH_ARG_

#define JUCE_NTH_ARG_ (   _00,
  _01,
  _02,
  _03,
  _04,
  _05,
  _06,
  _07,
  _08,
  _09,
  _10,
  _11,
  _12,
  _13,
  _14,
  _15,
  _16,
  _17,
  _18,
  _19,
  _20,
  _21,
  _22,
  _23,
  _24,
  _25,
  _26,
  _27,
  _28,
  _29,
  _30,
  _31,
  _32,
  _33,
  _34,
  _35,
  _36,
  _37,
  _38,
  _39,
  N,
  ... 
)    N

Return the Nth argument.

By passing a variadic pack followed by N other parameters, we can select one of those N parameter based on the length of the parameter pack.

◆ JUCE_POP_WARNINGS_GCC_LIKE

#define JUCE_POP_WARNINGS_GCC_LIKE (   compiler)    _Pragma(JUCE_TO_STRING(compiler diagnostic pop))

Pop the current warning scope.

◆ JUCE_PUSH_WARNINGS_GCC_LIKE

#define JUCE_PUSH_WARNINGS_GCC_LIKE (   compiler,
  ... 
)    JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, "-Wpragmas", __VA_ARGS__)

Push a new warning scope, and then ignore each warning for either clang or gcc.

If the compiler doesn't support __has_warning, we add -Wpragmas as the first disabled warning because otherwise we might get complaints about unknown warning options.

◆ JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION

#define JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION   11

◆ JUCE_TO_STRING

#define JUCE_TO_STRING (   x)    #x

Quote the argument, turning it into a string.

JUCE_TO_STRING
#define JUCE_TO_STRING(x)
Quote the argument, turning it into a string.
Definition: juce_CompilerWarnings.h:128
JUCE_CONCAT
#define JUCE_CONCAT(a, b)
Definition: juce_CompilerWarnings.h:125