From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: asmwarrior <asmwarrior@gmail.com>, gdb-patches@sourceware.org
Subject: [commit] [msys+mingw] build error [-Werror=uninitialized]
Date: Fri, 16 Mar 2012 08:19:00 -0000 [thread overview]
Message-ID: <20120316081921.GB17525@host2.jankratochvil.net> (raw)
In-Reply-To: <4F62EF65.1030203@codesourcery.com>
On Fri, 16 Mar 2012 08:44:37 +0100, Yao Qi wrote:
> 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.
Added there a comment like in other cases.
This improper warning happens with TRY_CATCH on older gccs.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2012-03/msg00203.html
--- src/gdb/ChangeLog 2012/03/15 18:53:42 1.14016
+++ src/gdb/ChangeLog 2012/03/16 08:18:07 1.14017
@@ -1,3 +1,9 @@
+2012-03-16 Yao Qi <yao@codesourcery.com>
+ Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix false compilation warning.
+ * gnu-v3-abi.c (print_one_vtable): Initialize ADDR.
+
2012-03-15 Jonathan Larmour <jifl@eCosCentric.com>
Pedro Alves <pedro@codesourcery.com>
--- src/gdb/gnu-v3-abi.c 2012/03/15 15:43:11 1.70
+++ src/gdb/gnu-v3-abi.c 2012/03/16 08:18:09 1.71
@@ -869,8 +869,9 @@
for (i = 0; i <= max_voffset; ++i)
{
+ /* Initialize it just to avoid a GCC false warning. */
+ CORE_ADDR addr = 0;
struct value *vfn;
- CORE_ADDR addr;
volatile struct gdb_exception ex;
printf_filtered ("[%d]: ", i);
next prev parent reply other threads:[~2012-03-16 8:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 1:56 asmwarrior
2012-03-16 7:26 ` Yao Qi
2012-03-16 7:31 ` asmwarrior
2012-03-16 7:45 ` Yao Qi
2012-03-16 8:19 ` Jan Kratochvil [this message]
2012-03-16 8:23 ` [commit] " asmwarrior
2012-03-16 14:09 ` asmwarrior
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=20120316081921.GB17525@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=asmwarrior@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/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