ada-lex: Ignore warnings about register keyword
[deliverable/binutils-gdb.git] / gdb / common / diagnostics.h
CommitLineData
f4906a9a
PA
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#ifdef __clang__
35# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
d1435379
SM
36# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER \
37 DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
f4906a9a
PA
38#else
39# define DIAGNOSTIC_IGNORE_SELF_MOVE
d1435379 40# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
f4906a9a
PA
41#endif
42
43#endif /* COMMON_DIAGNOSTICS_H */
This page took 0.025482 seconds and 4 git commands to generate.