Psi4
pragma.h
Go to the documentation of this file.
1 
3 #ifndef PULSAR_GUARD_PULSAR__PRAGMA_H_
4 #define PULSAR_GUARD_PULSAR__PRAGMA_H_
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 
11 
12 #if defined(__ICC) || defined(__INTEL_COMPILER)
13 
14  // pragmas for Intel
15  #define PRAGMA_WARNING_POP _Pragma("warning(pop)")
16  #define PRAGMA_WARNING_PUSH _Pragma("warning(push)")
17  #define PRAGMA_WARNING_IGNORE_UNUSED_PARAMETERS _Pragma("warning(disable:869)")
18  #define PRAGMA_WARNING_IGNORE_UNUSED_VARIABLES _Pragma("warning(disable:177)")
19  #define PRAGMA_WARNING_IGNORE_FP_EQUALITY _Pragma("warning(disable:1572)")
20  #define PRAGMA_WARNING_IGNORE_FP_CONVERT _Pragma("warning(disable:264 173)")
21  #define PRAGMA_WARNING_IGNORE_CONVERT _Pragma("warning(disable:2259)")
22  #define PRAGMA_WARNING_IGNORE_SWITCH_MISSING_DEFAULT _Pragma("warning(disable:2338)")
23  #define PRAGMA_WARNING_IGNORE_POINTLESS_COMPARISON_UINT_0 _Pragma("warning(disable:186)")
24  #define PRAGMA_WARNING_IGNORE_STATEMENT_UNREACHABLE _Pragma("warning(disable:111)")
25  #define PRAGMA_WARNING_IGNORE_SHADOW _Pragma("warning(disable:1599)")
26  #define PRAGMA_WARNING_IGNORE_SHADOW_MEMBER _Pragma("warning(disable:3280)")
27  #define PRAGMA_WARNING_IGNORE_EXTRA_SEMICOLON // does not have warning for intel
28  #define PRAGMA_WARNING_IGNORE_REDECLARED_INLINE _Pragma("warning(disable:522)")
29  #define PRAGMA_WARNING_IGNORE_UNUSED_LOCAL_TYPEDEFS
30  #define PRAGMA_WARNING_IGNORE_GCC_PRAGMA _Pragma("warning(disable:2282)")
31  #define PRAGMA_WARNING_IGNORE_NONVIRTUAL_DTOR _Pragma("warning(disable:444)")
32  #define PRAGMA_WARNING_IGNORE_UNUSED_FUNCTION
33  #define PRAGMA_WARNING_IGNORE_UNRECOGNIZED_PRAGMA _Pragma("warning(disable:161)")
34  #define PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS _Pragma("warning(disable:1478)")
35 
36 #elif defined(__GNUC__) || defined(__GNUG__)
37 
38  // pragmas for GCC
39  #define PRAGMA_WARNING_PUSH _Pragma("GCC diagnostic push")
40  #define PRAGMA_WARNING_POP _Pragma("GCC diagnostic pop")
41  #define PRAGMA_WARNING_IGNORE_UNUSED_PARAMETERS _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
42  #define PRAGMA_WARNING_IGNORE_UNUSED_VARIABLES _Pragma("GCC diagnostic ignored \"-Wunused-variable\"")
43  #define PRAGMA_WARNING_IGNORE_FP_EQUALITY _Pragma("GCC diagnostic ignored \"-Wfloat-equal\"")
44  #define PRAGMA_WARNING_IGNORE_FP_CONVERT _Pragma("GCC diagnostic ignored \"-Wfloat-conversion\"")
45  #define PRAGMA_WARNING_IGNORE_CONVERT _Pragma("GCC diagnostic ignored \"-Wconversion\"")
46  #define PRAGMA_WARNING_IGNORE_SWITCH_MISSING_DEFAULT _Pragma("GCC diagnostic ignored \"-Wswitch-default\"")
47  #define PRAGMA_WARNING_IGNORE_POINTLESS_COMPARISON_UINT_0 _Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
48  #define PRAGMA_WARNING_IGNORE_STATEMENT_UNREACHABLE
49  #define PRAGMA_WARNING_IGNORE_SHADOW _Pragma("GCC diagnostic ignored \"-Wshadow\"")
50  #define PRAGMA_WARNING_IGNORE_SHADOW_MEMBER
51  #define PRAGMA_WARNING_IGNORE_EXTRA_SEMICOLON _Pragma("GCC diagnostic ignored \"-Wpedantic\"")
52  #define PRAGMA_WARNING_IGNORE_REDECLARED_INLINE // does not have warning for GCC
53  #define PRAGMA_WARNING_IGNORE_UNUSED_LOCAL_TYPEDEFS _Pragma("GCC diagnostic ignored \"-Wunused-local-typedefs\"")
54  #define PRAGMA_WARNING_IGNORE_GCC_PRAGMA // uh... not a warning in gcc
55  #define PRAGMA_WARNING_IGNORE_NONVIRTUAL_DTOR // Doesn't seem to warn in GCC
56  #define PRAGMA_WARNING_IGNORE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"")
57  #define PRAGMA_WARNING_IGNORE_UNRECOGNIZED_PRAGMA _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"")
58  #define PRAGMA_WARNING_IGNORE_DEPRECATED_DECLARATIONS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
59 #endif
60 
61 
62 
63 
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif