IMP logo
IMP Reference Guide  2.20.0
The Integrative Modeling Platform
warning_macros.h
Go to the documentation of this file.
1 /**
2  * \file IMP/warning_macros.h
3  * \brief Macros to control compiler warnings.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPKERNEL_WARNING_MACROS_H
10 #define IMPKERNEL_WARNING_MACROS_H
11 
12 #include <IMP/kernel_config.h>
13 #include "internal/eat.h"
14 
15 #define IMP_REQUIRE_SEMICOLON_CLASS(Name)
16 #define IMP_REQUIRE_SEMICOLON_NAMESPACE
17 /*
18 #define IMP_REQUIRE_SEMICOLON_CLASS(Name)
19  IMP_NO_DOXYGEN(IMP_NO_SWIG(struct semicolon_##Name##_helper_struct{}))
20 #define IMP_REQUIRE_SEMICOLON_NAMESPACE void dummy_f()
21 */
22 
23 /** Disable unused variable warning for a variable.
24  */
25 #define IMP_UNUSED(variable) IMP::internal::eat(variable)
26 
27 #ifndef IMP_DOXYGEN
28 #ifdef __GNUC__
29 #define IMP_WARN_PREPROCESS(msg) IMP_PRAGMA(message IMP_STRINGIFY(msg))
30 
31 //#if __GNUC_PREREQ(4,2)
32 #define IMP_GCC_DISABLE_WARNING(name) \
33  IMP_GCC_PRAGMA(diagnostic ignored IMP_STRINGIFY(name))
34 
35 /*#else
36 #define IMP_GCC_DISABLE_WARNING(name)
37 #endif*/
38 
39 #else
40 #define IMP_GCC_DISABLE_WARNING(name)
41 #endif
42 
43 #endif
44 
45 #endif /* IMPKERNEL_WARNING_MACROS_H */