Skip to content
Snippets Groups Projects
  • Dirk Mueller's avatar
    74ac79fa
    re PR c++/5520 (Add a warning to detect empty body of if statements (like in the C frontend)) · 74ac79fa
    Dirk Mueller authored
    2006-01-20  Dirk Mueller  <dmueller@suse.com>
    
            PR c++/5520
            * c-parser.c (c_parser_if_body): Use build_empty_stmt()
            instead of a special NOP marker.
            * c-typeck.c (c_finish_if_stmt): Remove obsoleted special
            NOP marker handling.
            * c-common.h (empty_body_warning): Add forward declaration.
            * c-common.c (empty_body_warning): Add (from c_finish_if_stmt).
            Now uses IS_EMPTY_STMT() instead of special NOP markers.
    
            * semantics.c (finish_if_stmt): Call empty_body_warning.
            * parser.c (cp_parser_implicitly_scoped_statement):
            Mark empty statement with an empty stmt.
    
            * g++.dg/warn/empty-body.C: New.
    
    From-SVN: r110019
    74ac79fa
    History
    re PR c++/5520 (Add a warning to detect empty body of if statements (like in the C frontend))
    Dirk Mueller authored
    2006-01-20  Dirk Mueller  <dmueller@suse.com>
    
            PR c++/5520
            * c-parser.c (c_parser_if_body): Use build_empty_stmt()
            instead of a special NOP marker.
            * c-typeck.c (c_finish_if_stmt): Remove obsoleted special
            NOP marker handling.
            * c-common.h (empty_body_warning): Add forward declaration.
            * c-common.c (empty_body_warning): Add (from c_finish_if_stmt).
            Now uses IS_EMPTY_STMT() instead of special NOP markers.
    
            * semantics.c (finish_if_stmt): Call empty_body_warning.
            * parser.c (cp_parser_implicitly_scoped_statement):
            Mark empty statement with an empty stmt.
    
            * g++.dg/warn/empty-body.C: New.
    
    From-SVN: r110019