This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New ARI warning Wed May 23 01:55:03 UTC 2012
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, dje at google dot com, pierre dot muller at ics-cnrs dot unistra dot fr, gdb-patches at sourceware dot org
- Date: Fri, 22 Jun 2012 11:40:56 -0600
- Subject: Re: New ARI warning Wed May 23 01:55:03 UTC 2012
- References: <20120523015503.GA25312@sourceware.org> <m3r4ubo7j0.fsf@redhat.com> <CADPb22QBYSRjoqrgX7p0d5KdAZ+kEk4Ga2YrfHMrm_t_yKCE6w@mail.gmail.com> <CADPb22QOSCV240MV2m0KmsXfNb9O5_WsA+7Jsjn1UJwigaNTrQ@mail.gmail.com> <4fbc9d77.0853b40a.641e.ffff90dbSMTPIN_ADDED@mx.google.com> <CADPb22Qi0Zda439aieEGu26+GWf0y8XzBUkcpg-Kw1BUcjvPNA@mail.gmail.com> <87bold8l4d.fsf@fleche.redhat.com> <201205282043.q4SKhksB010254@glazunov.sibelius.xs4all.nl> <87ipejib8o.fsf@fleche.redhat.com> <20120622171922.GK2799@adacore.com> <20120622173049.GL2799@adacore.com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
>> * configure.ac (build_warnings): Add -Wdeclaration-after-statement.
>> * configure: Regenerate.
Yes, ok. Thanks; I hadn't realized there was a flag for this already :)
Discussion on irc pointed out that this is still allowed:
for (int i = 0; ...)
I think this doesn't suffer from the readability problems that
declarations in the code generally do; and in fact usually makes the
code cleaner, by restricting the scope of the loop variable.
How about we flip the switch to C99 for 7.6?
Tom