JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
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_DEPRECATION_WARNINGS
 
#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.
 
#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.
 
#define JUCE_END_IGNORE_DEPRECATION_WARNINGS
 
#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.
 
#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.
 
#define JUCE_IGNORE_MSVC(warnings)
 Push/pop warnings on MSVC.
 
#define JUCE_IGNORE_WARNINGS_GCC_LIKE(compiler, ...)
 
#define JUCE_POP_WARNINGS_GCC_LIKE(compiler)    _Pragma(JUCE_TO_STRING(compiler diagnostic pop))
 Pop the current warning scope.
 
#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.
 
#define JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION   11
 

Macro Definition Documentation

◆ JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS

#define JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
Value:
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") \
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE(...)
Push/pop warnings on compilers with gcc-like warning flags.
Definition juce_CompilerWarnings.h:212

◆ 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_END_IGNORE_DEPRECATION_WARNINGS

#define JUCE_END_IGNORE_DEPRECATION_WARNINGS
Value:
JUCE_END_IGNORE_WARNINGS_MSVC \
JUCE_END_IGNORE_WARNINGS_GCC_LIKE

◆ 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_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