Control Surface new-input
MIDI Control Surface library for Arduino
Warnings.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #if defined(__GNUC__) && !defined(__clang__)
4 
5 #if __GNUC__ >= 5
6 
7 #define AH_DIAGNOSTIC_WERROR() \
8  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic error \"-Wall\"") \
9  _Pragma("GCC diagnostic error \"-Wextra\"") \
10  _Pragma("GCC diagnostic ignored \"-Wc++0x-compat\"")
11 #define AH_DIAGNOSTIC_POP() _Pragma("GCC diagnostic pop")
12 #define AH_DIAGNOSTIC_EXTERNAL_HEADER() \
13  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wall\"") \
14  _Pragma("GCC diagnostic ignored \"-Wextra\"") \
15  _Pragma("GCC diagnostic ignored \"-Wsuggest-override\"") \
16  _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
17 
18 #else // __GNUC__ < 5
19 
20 #define AH_DIAGNOSTIC_WERROR() \
21  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic error \"-Wall\"") \
22  _Pragma("GCC diagnostic error \"-Wextra\"") \
23  _Pragma("GCC diagnostic ignored \"-Wc++0x-compat\"") \
24  _Pragma("GCC diagnostic ignored \"-Wattributes\"")
25 #define AH_DIAGNOSTIC_POP() _Pragma("GCC diagnostic pop")
26 #define AH_DIAGNOSTIC_EXTERNAL_HEADER() \
27  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wall\"") \
28  _Pragma("GCC diagnostic ignored \"-Wextra\"") \
29  _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
30 
31 #endif
32 
33 #else
34 
35 #define AH_DIAGNOSTIC_WERROR()
36 #define AH_DIAGNOSTIC_POP()
37 #define AH_DIAGNOSTIC_EXTERNAL_HEADER()
38 
39 #endif