From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10201 invoked by alias); 4 Jul 2011 14:21:57 -0000 Received: (qmail 10189 invoked by uid 22791); 4 Jul 2011 14:21:56 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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, 04 Jul 2011 14:21:39 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p64ELbiS006760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Jul 2011 10:21:37 -0400 Received: from host1.jankratochvil.net (ovpn-113-84.phx2.redhat.com [10.3.113.84]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p64ELZdL015175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Jul 2011 10:21:36 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p64ELYBs011847; Mon, 4 Jul 2011 16:21:34 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p64ELXYR011832; Mon, 4 Jul 2011 16:21:33 +0200 Date: Mon, 04 Jul 2011 16:22:00 -0000 From: Jan Kratochvil To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: [commit#2+7.3] Re: [patch 1/2] physname reg.: linespec minsym fallback Message-ID: <20110704142132.GA7866@host1.jankratochvil.net> References: <20110701202105.GA22980@host1.jankratochvil.net> <201107041313.p64DDvoS029301@d06av02.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107041313.p64DDvoS029301@d06av02.portsmouth.uk.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2011-07/txt/msg00098.txt.bz2 On Mon, 04 Jul 2011 15:13:57 +0200, Ulrich Weigand wrote: > On some machines (RHEL 5.6 with GCC 4.1.2 system compiler) I'm now seeing: > > cc1: warnings being treated as errors > /home/kwerner/dailybuild/spu-tc-2011-07-04/gdb-head/src/gdb/linespec.c: In function 'decode_line_1': > /home/kwerner/dailybuild/spu-tc-2011-07-04/gdb-head/src/gdb/linespec.c:928: warning: 'values.nelts' may be used uninitialized in this function > /home/kwerner/dailybuild/spu-tc-2011-07-04/gdb-head/src/gdb/linespec.c:928: warning: 'values.sals' may be used uninitialized in this function > > Should there be an initializer somewhere? This false GCC warning I have seen when TRY_CATCH is in use like in this case. Curiously I failed to reproduce this warning on gcc-4.1.2-50.el5.x86_64. Anyway checked in HEAD (below) and in 7.3: http://sourceware.org/ml/gdb-cvs/2011-07/msg00055.html Thanks, Jan http://sourceware.org/ml/gdb-cvs/2011-07/msg00054.html --- src/gdb/ChangeLog 2011/07/01 20:27:58 1.13154 +++ src/gdb/ChangeLog 2011/07/04 14:16:13 1.13155 @@ -1,3 +1,8 @@ +2011-07-04 Jan Kratochvil + + Fix false GCC warning. + * linespec.c (decode_line_1): Initialize values. + 2011-07-01 Jan Kratochvil * linespec.c (find_method): Accept the function type automatically only --- src/gdb/linespec.c 2011/07/01 20:27:58 1.125 +++ src/gdb/linespec.c 2011/07/04 14:16:14 1.126 @@ -932,6 +932,9 @@ if (is_quote_enclosed) ++saved_arg; + /* Initialize it just to avoid a GCC false warning. */ + memset (&values, 0, sizeof (values)); + TRY_CATCH (ex, RETURN_MASK_ERROR) { values = decode_compound (argptr, funfirstline, canonical,