Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Peter Schauer <peterschauer@gmx.net>,
	 gdb@sourceware.org, 	  gdb-patches@sources.redhat.com
Subject: Re: gdb/m2-typeprint.c does not compile with older gcc versions
Date: Mon, 29 May 2006 14:47:00 -0000	[thread overview]
Message-ID: <vt27j4594dx.fsf@theseus.home.> (raw)
In-Reply-To: <20060527175215.GH1062@adacore.com> (Joel Brobecker's message of "Sat, 27 May 2006 10:52:15 -0700")


Joel Brobecker <brobecker@adacore.com> writes:
> On Sat, May 27, 2006 at 01:12:28PM +0200, Peter Schauer wrote:
>> 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:
>
> Thanks Peter. To me, this is an obvious fix, so I checked it in for you
> in both head and 6.5 branch.
>
> 2006-05-27  Joel Brobecker  <brobecker@adacore.com>
>
>         From Peter Schauer <peterschauer@gmx.net>
>         * m2-typeprint.c (m2_record_fields): Move variable declarations
>         to the begining of the block.
>
> Tested by re-building GDB after patch.

For what it's worth, ISO C99 allows declarations after code.  I don't
know when it was introduced.  GDB is supposed to only require C90,
according to doc/gdbint.texinfo, so I agree the patch is right,
though.


      reply	other threads:[~2006-05-28 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-27 14:22 Peter Schauer
2006-05-29 12:23 ` Joel Brobecker
2006-05-29 14:47   ` Jim Blandy [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=vt27j4594dx.fsf@theseus.home. \
    --to=jimb@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@sourceware.org \
    --cc=peterschauer@gmx.net \
    /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