From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Cc: simon.marchi@polymtl.ca
Subject: Re: [PATCH v2] Catch exception in value_rtti_indirect_type
Date: Fri, 23 Jan 2015 18:00:00 -0000 [thread overview]
Message-ID: <54C27B67.3000209@redhat.com> (raw)
In-Reply-To: <54C27035.5030205@ericsson.com>
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
next prev parent reply other threads:[~2015-01-23 16:49 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 [this message]
2015-01-24 1:46 ` Simon Marchi
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=54C27B67.3000209@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.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).