From patchwork Sun Apr 1 18:09:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 26544 Received: (qmail 61558 invoked by alias); 1 Apr 2018 18:09:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 61548 invoked by uid 89); 1 Apr 2018 18:09:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=storage, deprecated, our X-HELO: barracuda.ebox.ca Received: from barracuda.ebox.ca (HELO barracuda.ebox.ca) (96.127.255.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Apr 2018 18:09:40 +0000 X-ASG-Debug-ID: 1522606173-0c856e618a76b450001-fS2M51 Received: from smtp.ebox.ca (smtp.electronicbox.net [96.127.255.82]) by barracuda.ebox.ca with ESMTP id ADTcA3rGVZNrTSuv (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 01 Apr 2018 14:09:33 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.lan (unknown [192.222.164.54]) by smtp.ebox.ca (Postfix) with ESMTP id ED832441B21; Sun, 1 Apr 2018 14:09:32 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 192-222-164-54.qc.cable.ebox.net[192.222.164.54] X-Barracuda-Apparent-Source-IP: 192.222.164.54 X-Barracuda-RBL-IP: 192.222.164.54 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] Add -Wno-error=deprecated-register to gdb build flags Date: Sun, 1 Apr 2018 14:09:31 -0400 X-ASG-Orig-Subj: [PATCH] Add -Wno-error=deprecated-register to gdb build flags Message-Id: <20180401180931.16643-1-simon.marchi@polymtl.ca> X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1522606173 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1727 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.49494 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-IsSubscribed: yes 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/configure | 3 ++- gdb/warning.m4 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/configure b/gdb/configure index ab5818785333..f2acc1bf9e2c 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 ba52fb6c9ff0..3cfae65e7808 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*)