Add -Wempty-body to warning set

Tom Tromey
Fri Oct 19 16:44:00 GMT 2012

>>>>> "Pedro" == Pedro Alves <> writes:

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


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

I was surprised, too, but then I read that 'while' is explicitly
excluded from the warning:

         Warn if an empty body occurs in an `if', `else' or `do while'
         statement.  This warning is also enabled by `-Wextra'.

Pedro> FAOD, this is fine with me.

Thanks.  I'm going to wait for more comments.


More information about the Gdb-patches mailing list