This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c/49053] New: Please add an option to catch empty statements (-Wempty-statement ?)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49053

           Summary: Please add an option to catch empty statements
                    (-Wempty-statement ?)
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: austinenglish@gmail.com


It would be useful to have an option to catch empty statements, e.g.:

#include <stdio.h>
int main(void)
{
    ;;
    return 0;
}

a la -Wempty-body does currently.

I've seen this happen a few times recently in Wine, especially when expanding
macros, e.g,.:
http://source.winehq.org/git/wine.git/commitdiff/a67941d3936ef9db9c56db816393ec8187c91274


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