From patchwork Sat Aug 15 00:36:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Seitz X-Patchwork-Id: 8216 Received: (qmail 25538 invoked by alias); 15 Aug 2015 00:36:05 -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 25528 invoked by uid 89); 15 Aug 2015 00:36:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 15 Aug 2015 00:36:04 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id BDC0019CBEF for ; Sat, 15 Aug 2015 00:36:02 +0000 (UTC) Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7F0a2ob013761 for ; Fri, 14 Aug 2015 20:36:02 -0400 From: Keith Seitz To: gdb-patches@sourceware.org Subject: [PATCH/obv] Rename `typename' in d-exp.y to avoid C++ reserved word Date: Fri, 14 Aug 2015 17:36:02 -0700 Message-Id: <1439598962-32364-1-git-send-email-keiths@redhat.com> X-IsSubscribed: yes A recent patch introduced a variable named `typename' into d-exp.y, and one of the --enable-with-cxx build slaves consequently failed to compile this. This patch simply adds an underscore into the name to avoid the reserved word. gdb/ChangeLog * d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Rename `typename' to `type_name' to avoid C++ reserved word. --- gdb/ChangeLog | 5 +++++ gdb/d-exp.y | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0b604fd..d699070 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2015-08-14 Keith Seitz + * d-exp.y (PrimaryExpression : TypeExp '.' IdentifierExp): Rename + `typename' to `type_name' to avoid C++ reserved word. + +2015-08-14 Keith Seitz + * location.c (EL_TYPE, EL_LINESPEC, EL_PROBE, EL_ADDRESS) (EL_EXPLICIT, EL_STRING): Change macro parameter to "P" to silence ARI errors. diff --git a/gdb/d-exp.y b/gdb/d-exp.y index e23a0aa..e9d21ac 100644 --- a/gdb/d-exp.y +++ b/gdb/d-exp.y @@ -522,12 +522,12 @@ PrimaryExpression: { struct bound_minimal_symbol msymbol; struct block_symbol sym; - const char *typename = TYPE_SAFE_NAME (type); - int typename_len = strlen (typename); + const char *type_name = TYPE_SAFE_NAME (type); + int type_name_len = strlen (type_name); char *name; name = xstrprintf ("%.*s.%.*s", - typename_len, typename, + type_name_len, type_name, $3.length, $3.ptr); make_cleanup (xfree, name);