Remove free_splay_tree cleanup
[deliverable/binutils-gdb.git] / gdb / common / diagnostics.h
1 /* Copyright (C) 2017 Free Software Foundation, Inc.
2
3 This file is part of GDB.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18 #ifndef COMMON_DIAGNOSTICS_H
19 #define COMMON_DIAGNOSTICS_H
20
21 #include "common/preprocessor.h"
22
23 #ifdef __GNUC__
24 # define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push")
25 # define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop")
26 # define DIAGNOSTIC_IGNORE(option) \
27 _Pragma (STRINGIFY (GCC diagnostic ignored option))
28 #else
29 # define DIAGNOSTIC_PUSH
30 # define DIAGNOSTIC_POP
31 # define DIAGNOSTIC_IGNORE(option)
32 #endif
33
34 #if defined (__clang__) /* clang */
35
36 # define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
37 # define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \
38 DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
39 # define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
40 DIAGNOSTIC_IGNORE ("-Wunused-function")
41
42 #elif defined (__GNUC__) /* GCC */
43
44 # define DIAGNOSTIC_IGNORE_SELF_MOVE
45 # define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
46 # define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
47 DIAGNOSTIC_IGNORE ("-Wunused-function")
48
49 #else /* Other compilers */
50
51 # define DIAGNOSTIC_IGNORE_SELF_MOVE
52 # define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
53 # define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
54 #endif
55
56 #endif /* COMMON_DIAGNOSTICS_H */
This page took 0.042023 seconds and 4 git commands to generate.