OSDN Git Service

2006-01-20 Dirk Mueller <dmueller@suse.com>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jan 2006 09:30:22 +0000 (09:30 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jan 2006 09:30:22 +0000 (09:30 +0000)
commit50247dd938763df581825bd0d2a09fc39fbe8d85
treebc92b7d88bae96e3177ed2217eb031fe56a30961
parentbbb1e488ddd263ca6a4fa4f50ff5b545846e20ec
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110019 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-parser.c
gcc/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/empty-body.C [new file with mode: 0644]