From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17664 invoked by alias); 23 Jan 2015 16:49:01 -0000 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 Received: (qmail 17590 invoked by uid 89); 23 Jan 2015 16:48:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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; Fri, 23 Jan 2015 16:48:52 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0NGmenA030777 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Jan 2015 11:48:41 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0NGmdg3000375; Fri, 23 Jan 2015 11:48:39 -0500 Message-ID: <54C27B67.3000209@redhat.com> Date: Fri, 23 Jan 2015 18:00:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Simon Marchi , gdb-patches@sourceware.org CC: simon.marchi@polymtl.ca Subject: Re: [PATCH v2] Catch exception in value_rtti_indirect_type References: <1411174953-8930-1-git-send-email-simon.marchi@ericsson.com> <54809E38.3080606@redhat.com> <54821670.6020006@ericsson.com> <54C23FB2.90300@redhat.com> <54C27035.5030205@ericsson.com> In-Reply-To: <54C27035.5030205@ericsson.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2015-01/txt/msg00658.txt.bz2 On 01/23/2015 04:00 PM, Simon Marchi wrote: > Hmm I am now getting a > > /home/emaisin/src/binutils-gdb/gdb/valops.c:3625:13: error: ‘target’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > real_type = value_rtti_type (target, full, top, using_enc); > > Logically, target can't be uninitialized there because of the exception throw. I would expect gcc to be > smarter about it, since throw_error is marked as noreturn. I can obviously fix it by assigning it to NULL > at declaration time, but is there a better way of getting rid of the error in these cases? Bah. Yeah, initializing as NULL is fine. Thanks, Pedro Alves