From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25919 invoked by alias); 24 Sep 2012 09:53:52 -0000 Received: (qmail 25910 invoked by uid 22791); 24 Sep 2012 09:53:51 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Sep 2012 09:53:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8O9rW4S005556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Sep 2012 05:53:32 -0400 Received: from spoyarek (spoyarek.pnq.redhat.com [10.65.192.188]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8O9rU6q001031 for ; Mon, 24 Sep 2012 05:53:31 -0400 Date: Mon, 24 Sep 2012 09:53:00 -0000 From: Siddhesh Poyarekar To: gdb-patches@sourceware.org Subject: [PATCH] Expand variables to accommodate LONGEST enumval Message-ID: <20120924152250.42bb17fa@spoyarek> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/v00yjYt/.rnoTI1_J4GDsif" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00490.txt.bz2 --MP_/v00yjYt/.rnoTI1_J4GDsif Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 397 Hi, While reviewing my bitpos patch[1] I found a couple of cases where a variable that takes the value of enumval (type.main_type.flds_bnds.fields[i].loc.enumval) is declared as int instead of LONGEST. No regressions resulting from it. OK to commit? Regards, Siddhesh gdb/ChangeLog: * m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST. * p-valprint.c (pascal_type_print_base): Likewise. --MP_/v00yjYt/.rnoTI1_J4GDsif Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=enumval.patch Content-length: 960 ? .m2-typeprint.c.swp ? eliminate-vars.patch ? enumval.patch Index: m2-typeprint.c =================================================================== RCS file: /cvs/src/src/gdb/m2-typeprint.c,v retrieving revision 1.30 diff -u -r1.30 m2-typeprint.c --- m2-typeprint.c 18 Apr 2012 06:46:46 -0000 1.30 +++ m2-typeprint.c 24 Sep 2012 09:33:22 -0000 @@ -587,7 +587,8 @@ void m2_enum (struct type *type, struct ui_file *stream, int show, int level) { - int lastval, i, len; + LONGEST lastval; + int i, len; if (show < 0) { Index: p-typeprint.c =================================================================== RCS file: /cvs/src/src/gdb/p-typeprint.c,v retrieving revision 1.47 diff -u -r1.47 p-typeprint.c --- p-typeprint.c 16 Aug 2012 07:36:20 -0000 1.47 +++ p-typeprint.c 24 Sep 2012 09:33:22 -0000 @@ -440,7 +440,7 @@ { int i; int len; - int lastval; + LONGEST lastval; enum { s_none, s_public, s_private, s_protected --MP_/v00yjYt/.rnoTI1_J4GDsif--