From: Peter Schauer <peterschauer@gmx.net>
To: gdb@sourceware.org
Subject: gdb/m2-typeprint.c does not compile with older gcc versions
Date: Sat, 27 May 2006 14:22:00 -0000 [thread overview]
Message-ID: <200605271112.k4RBCSts022936@licht.localdomain> (raw)
gdb/m2-typeprint.c does not compile with older gcc versions, e.g. gcc-2.95.2.
It is caused by declarations after code, which is a gcc extension AFAIK.
The gdb-6.5 branch is affected as well.
Here is a fix:
--- m2-typeprint.c.orig 2006-05-23 18:06:34.773753000 +0200
+++ m2-typeprint.c 2006-05-23 19:55:21.047509000 +0200
@@ -504,13 +504,14 @@ m2_record_fields (struct type *type, str
}
else if (show > 0)
{
+ int i;
+ int len = TYPE_NFIELDS (type);
+
if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
fprintf_filtered (stream, "RECORD\n");
else if (TYPE_CODE (type) == TYPE_CODE_UNION)
/* i18n: Do not translate "CASE" and "OF" */
fprintf_filtered (stream, _("CASE <variant> OF\n"));
- int i;
- int len = TYPE_NFIELDS (type);
for (i = TYPE_N_BASECLASSES (type); i < len; i++)
{
--
Peter Schauer Peter.Schauer@mytum.de
next reply other threads:[~2006-05-27 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-27 14:22 Peter Schauer [this message]
2006-05-29 12:23 ` Joel Brobecker
2006-05-29 14:47 ` Jim Blandy
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=200605271112.k4RBCSts022936@licht.localdomain \
--to=peterschauer@gmx.net \
--cc=gdb@sourceware.org \
/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