This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Add -Wno-error=deprecated-register to gdb build flags


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7f8a5d38ed00ad4ecc920322c4b852f3cf905a94

commit 7f8a5d38ed00ad4ecc920322c4b852f3cf905a94
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Fri Apr 6 16:11:51 2018 -0400

    Add -Wno-error=deprecated-register to gdb build flags
    
    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.

Diff:
---
 gdb/ChangeLog  | 6 ++++++
 gdb/configure  | 3 ++-
 gdb/warning.m4 | 3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e725f13..8b986c6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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".
diff --git a/gdb/configure b/gdb/configure
index ab58187..f2acc1b 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -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*)
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index ba52fb6..3cfae65 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -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*)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]