diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2024-04-07 22:57:19 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2024-04-07 22:57:39 -0400 |
commit | ecc3c386677c2c096b2d589588dd26d21a0fb476 (patch) | |
tree | 30ead7a1d3f709b57dd0779cbbce491c5394a8a8 /COPYING.LIB | |
parent | 248b6326a49ed49e2f627d3bddbac514a074bac0 (diff) | |
download | binutils-ecc3c386677c2c096b2d589588dd26d21a0fb476.zip binutils-ecc3c386677c2c096b2d589588dd26d21a0fb476.tar.gz binutils-ecc3c386677c2c096b2d589588dd26d21a0fb476.tar.bz2 |
gdb: ignore -Wregister instead of -Wdeprecated-register
When building GDB on Centos 7 (which has flex 2.5.37) and Clang, I get:
$ make ada-exp.o
YACC ada-exp.c
LEX ada-lex.c
CXX ada-exp.o
In file included from /home/smarchi/src/binutils-gdb/gdb/ada-exp.y:1179:
<stdout>:1106:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
1106 | register yy_state_type yy_current_state;
| ^~~~~~~~
In ada-lex.l, we already use `DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER`,
which for Clang translates to ignoring `-Wdeprecated-register` [1]. I think
that was produced when compiling as C++11, but now that we always compile as
C++17, Clang produces a `-Wregister` error [2].
For GCC, `DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER` already translates to
ignoring `-Wregister`. So, rename
`DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER` to `DIAGNOSTIC_IGNORE_REGISTER`
and ignore `-Wregister` for Clang too.
[1] https://releases.llvm.org/17.0.1/tools/clang/docs/DiagnosticsReference.html#wdeprecated-register
[2] https://releases.llvm.org/17.0.1/tools/clang/docs/DiagnosticsReference.html#wregister
include/ChangeLog:
* diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER): Rename
to...
(DIAGNOSTIC_IGNORE_REGISTER): ... this. Ignore `-Wregister`
instead of `-Wdeprecated-register`.
Change-Id: I8a4a51c7222c68577fa22ecacdddfcba32d9dbc5
Diffstat (limited to 'COPYING.LIB')
0 files changed, 0 insertions, 0 deletions