This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New ARI warning Wed May 23 01:55:03 UTC 2012


> 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...

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?

Thanks,
-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]