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]

Add -Wempty-body to warning set (was: Re: RFC: fix bug in compare_breakpoints)


[Changing $subject.  As with all warning set addition, this is likely to introduce
new -Werror build failures on other hosts/ports.]

On 10/19/2012 05:16 PM, Tom Tromey wrote:
> Tom> The other problem is caught by -Wempty-body, which we don't enable.  It
> Tom> yields a number of warnings and would require a coding style change
> Tom> from:
> [...]
> 
> FWIW, here's the patch.  Comments appreciated.
> 
> I do think it is a mild improvement.  It is a lot easier to mistype a
> ";" than a correctly formatted brace pair.

I agree it's a mild improvement.  Though I'm surprised at how few cases
in common code this reveals -- I thought we had more of:

while (...)
  ;

FAOD, this is fine with me.

Thanks.

-- 
Pedro Alves


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