From: "Mark Kettenis" <mark.kettenis@xs4all.nl>
To: "Jim Blandy" <jimb@codesourcery.com>
Cc: "Markus Deuling" <deuling@de.ibm.com>,
"Joel Brobecker" <brobecker@adacore.com>,
gdb@sourceware.org
Subject: Re: GDB 6.5.90 available for testing (GDB 6.6 pre-release)
Date: Tue, 05 Dec 2006 21:37:00 -0000 [thread overview]
Message-ID: <24560.163.1.150.229.1165354580.squirrel@webmail.xs4all.nl> (raw)
In-Reply-To: <m3lklm2m2s.fsf@codesourcery.com>
>
> Here's the patch I've been using for this. It'd be better to rework
> the way those functions use those obstacks, but...
>
> 2006-12-05 Jim Blandy <jimb@codesourcery.com>
>
> * cp-valprint.c (cp_print_value_fields, cp_print_value):
> Initialize tmp_obstack, to avoid warnings.
> * p-valprint.c (pascal_object_print_value_fields)
> (pascal_object_print_value): Same.
This is silly, at least if they are really unecessary. It's a bug in GCC
and should be fixed. I mean, GCC should get better at detecting this sort
of things; not give more false positives.
Markus, can you file a GCC bug report for this?
>
> diff -rN -u old-lval/gdb/cp-valprint.c new-lval/gdb/cp-valprint.c
> --- gdb/cp-valprint.c 2006-12-05 11:11:42.000000000 -0800
> +++ gdb/cp-valprint.c 2006-12-05 11:11:43.000000000 -0800
> @@ -269,6 +269,9 @@
> char *last_dont_print = obstack_next_free
> (&dont_print_statmem_obstack);
> int fields_seen = 0;
>
> + /* This isn't necessary, but it avoids compiler warnings. */
> + obstack_init (&tmp_obstack);
> +
> CHECK_TYPEDEF (type);
>
> fprintf_filtered (stream, "{");
> @@ -531,6 +534,9 @@
> int thisoffset;
> struct type *thistype;
>
> + /* This isn't necessary, but it avoids compiler warnings. */
> + obstack_init (&tmp_obstack);
> +
> if (dont_print_vb == 0)
> {
> /* If we're at top level, carve out a completely fresh
> diff -rN -u old-lval/gdb/p-valprint.c new-lval/gdb/p-valprint.c
> --- gdb/p-valprint.c 2006-12-05 11:11:42.000000000 -0800
> +++ gdb/p-valprint.c 2006-12-05 11:11:44.000000000 -0800
> @@ -756,6 +756,9 @@
> struct obstack tmp_obstack;
> char *last_dont_print = obstack_next_free
> (&dont_print_statmem_obstack);
>
> + /* This isn't necessary, but it avoids compiler warnings. */
> + obstack_init (&tmp_obstack);
> +
> CHECK_TYPEDEF (type);
>
> fprintf_filtered (stream, "{");
> @@ -927,6 +930,9 @@
> = (struct type **) obstack_next_free (&dont_print_vb_obstack);
> int i, n_baseclasses = TYPE_N_BASECLASSES (type);
>
> + /* This isn't necessary, but it avoids compiler warnings. */
> + obstack_init (&tmp_obstack);
> +
> if (dont_print_vb == 0)
> {
> /* If we're at top level, carve out a completely fresh
>
>
next prev parent reply other threads:[~2006-12-05 21:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-02 19:23 Joel Brobecker
2006-12-04 9:35 ` Markus Deuling
2006-12-04 18:22 ` Joel Brobecker
2006-12-04 18:23 ` Daniel Jacobowitz
2006-12-05 7:02 ` Markus Deuling
2006-12-05 19:02 ` Joel Brobecker
2006-12-05 19:12 ` Jim Blandy
2006-12-05 20:09 ` Daniel Jacobowitz
2006-12-05 21:56 ` Jim Blandy
2006-12-05 20:35 ` H. J. Lu
2006-12-05 21:37 ` Mark Kettenis [this message]
2006-12-05 21:41 ` Daniel Jacobowitz
2006-12-06 16:06 ` Markus Deuling
2006-12-13 11:47 ` Markus Deuling
2006-12-04 12:09 ` Marc Kleine-Budde
2006-12-04 18:29 ` Joel Brobecker
2006-12-04 19:38 ` Ulrich Weigand
2006-12-05 7:40 ` Markus Deuling
2006-12-05 18:56 ` Joel Brobecker
2006-12-06 12:02 ` Markus Deuling
2006-12-06 17:48 ` Joel Brobecker
2006-12-07 10:00 ` Markus Deuling
2006-12-04 20:37 Kaz Kylheku
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=24560.163.1.150.229.1165354580.squirrel@webmail.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=brobecker@adacore.com \
--cc=deuling@de.ibm.com \
--cc=gdb@sourceware.org \
--cc=jimb@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