From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1794 invoked by alias); 16 Mar 2012 07:45:58 -0000 Received: (qmail 1785 invoked by uid 22791); 16 Mar 2012 07:45:57 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,TW_SM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Mar 2012 07:45:44 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1S8Rr5-0005dL-TW from Yao_Qi@mentor.com ; Fri, 16 Mar 2012 00:45:43 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 16 Mar 2012 00:45:41 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Fri, 16 Mar 2012 00:45:42 -0700 Message-ID: <4F62EF65.1030203@codesourcery.com> Date: Fri, 16 Mar 2012 07:45:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: asmwarrior CC: Subject: Re: [msys+mingw] build error [-Werror=uninitialized] References: <4F629DE1.8060002@gmail.com> <4F62EAC8.8020000@codesourcery.com> <4F62EC5C.1050609@gmail.com> In-Reply-To: <4F62EC5C.1050609@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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: 2012-03/txt/msg00588.txt.bz2 On 03/16/2012 03:31 PM, asmwarrior wrote: > TRY_CATCH (ex, RETURN_MASK_ERROR) > { > addr = value_as_address (vfn); > } > Which means addr is set before passed to print_function_pointer_address() call. > > So I'm not sure why gcc report such warning. No idea on this. Patch below fixes the problem on my box. -- Yao (齐尧) 2012-03-16 Yao Qi index 0ba6ab5..5bfabe3 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -870,7 +870,7 @@ print_one_vtable (struct gdbarch *gdbarch, struct value *value, for (i = 0; i <= max_voffset; ++i) { struct value *vfn; - CORE_ADDR addr; + CORE_ADDR addr = 0; volatile struct gdb_exception ex; printf_filtered ("[%d]: ", i);