New ARI warning Wed May 23 01:55:03 UTC 2012
Mark Kettenis
mark.kettenis@xs4all.nl
Tue Jun 26 13:15:00 GMT 2012
> Date: Fri, 22 Jun 2012 10:19:22 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> > Mark> So I'd have no objection to requiring C99, except for one
> > Mark> style-related issue. I really, really hate mixing declarations with
> > Mark> code (something that C99 started to allow). So if we switch to
> > Mark> requiring C99, I think we should add a rule to the coding standards
> > Mark> that variables may only be declared at the start of a block.
> >
> > If there is no warning for it, then uses will slip in.
>
> Here is a patch that adds -Wdeclaration-after-statement to the list
> of compiler warnings...
Oh, there *is* a flag for this? I looked for it but didn't find it...
> Tested on x86_64-linux by rebuilding the native compiler with
> --enable-targets=all.
>
> gdb/ChangeLog:
>
> * configure.ac (build_warnings): Add -Wdeclaration-after-statement.
> * configure: Regenerate.
>
> OK to commit?
yes, please
More information about the Gdb-patches
mailing list