Add -Wno-error=deprecated-register to gdb build flags
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 6 Apr 2018 20:11:51 +0000 (16:11 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Fri, 6 Apr 2018 20:11:51 +0000 (16:11 -0400)
As shown in PR 23022, building with clang-6 and Python 2 trips on the
fact that the Python 2 headers use the "register" keyword:

/usr/include/python2.7/unicodeobject.h:534:5: error: 'register' storage class specifier is deprecated and incompatible with C++17 [-Werror,-Wdeprecated-register]
    register PyObject *obj,     /* Object */
    ^~~~~~~~~

This patch adds -Wno-error=deprecated-register to our flags, so that we can
still see this class of warnings, but they don't cause a build failure.

gdb/ChangeLog:

PR gdb/23022
* warning.m4: Add -Wno-error=deprecated-register.
* configure: Re-generate.

gdb/ChangeLog
gdb/configure
gdb/warning.m4

index e725f13ccaad3ee5b5c49bd8ffc0b6615c3991e9..8b986c670319fcb05446af2c297648338ebfc826 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       PR gdb/23022
+       * warning.m4: Add -Wno-error=deprecated-register.
+       * configure: Re-generate.
+
 2018-04-05  Tom Tromey  <tom@tromey.com>
 
        * linespec.h: Remove include of "vec.h".
index ab58187853337c632af046adb589f9c8a5b9e8a3..f2acc1bf9e2c2765f61e6ba7e17fd4b71977aba7 100755 (executable)
@@ -15358,7 +15358,8 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-switch -Wno-char-subscripts \
 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
 -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
--Wno-mismatched-tags"
+-Wno-mismatched-tags \
+-Wno-error=deprecated-register"
 
 case "${host}" in
   *-*-mingw32*)
index ba52fb6c9ff08d0a7c79ac87d13e0bf798797787..3cfae65e780883bcb01ec58406d1b1c87ed1a9d0 100644 (file)
@@ -41,7 +41,8 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-switch -Wno-char-subscripts \
 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
 -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized \
--Wno-mismatched-tags"
+-Wno-mismatched-tags \
+-Wno-error=deprecated-register"
 
 case "${host}" in
   *-*-mingw32*)