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: Add -Wempty-body to warning set


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> 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.]

Thanks.

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:

    `-Wempty-body'
         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.

Tom


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