public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Cc: <simon.marchi@polymtl.ca>
Subject: Re: [PATCH v2] Catch exception in value_rtti_indirect_type
Date: Sat, 24 Jan 2015 01:46:00 -0000	[thread overview]
Message-ID: <54C28C22.9070405@ericsson.com> (raw)
In-Reply-To: <54C27B67.3000209@redhat.com>



On 15-01-23 11:48 AM, Pedro Alves wrote:
> 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

Thanks, pushed.

      reply	other threads:[~2015-01-23 18:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-20  1:02 [PATCH] " Simon Marchi
2014-10-20 17:50 ` Simon Marchi
2014-12-01 13:35   ` Simon Marchi
2014-12-04 17:47 ` Pedro Alves
2014-12-05 20:32   ` [PATCH v2] " Simon Marchi
2015-01-23  0:13     ` Simon Marchi
2015-01-23 14:35     ` Pedro Alves
2015-01-23 16:35       ` Simon Marchi
2015-01-23 18:00         ` Pedro Alves
2015-01-24  1:46           ` Simon Marchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C28C22.9070405@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).