c-common.c (empty_if_body_warning): Remove.
commit626c34b5c945cc9c577bd0509d297b81df083d3f
authorPaolo Bonzini <bonzini@gnu.org>
Tue, 30 Sep 2008 09:52:41 +0000 (30 09:52 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Tue, 30 Sep 2008 09:52:41 +0000 (30 09:52 +0000)
tree550e5d90532796178dbba4eb2e6ff1c54828d12c
parentb5d60b839fd858c794384f4e6bf18005211e7add
c-common.c (empty_if_body_warning): Remove.

2008-09-30  Paolo Bonzini  <bonzini@gnu.org>

* c-common.c (empty_if_body_warning): Remove.
* c-common.h (empty_if_body_warning): Remove.
* c-parser.c (c_parser_if_body, c_parser_else_body): Implement
here the -Wempty-body warning for `if' and `else' statements.
* c-typeck.c (c_finish_if_stmt): Do not call empty_body_warning.

cp:
2008-09-30  Paolo Bonzini  <bonzini@gnu.org>

* parser.c (cp_parser_selection_statement): Implement here the
-Wempty-body warning for `if' and `else' statements.
* semantics.c (finish_if_stmt): Do not call empty_body_warning.

testsuite:
2008-09-30  Paolo Bonzini  <bonzini@gnu.org>

* g++.dg/warn/if-empty-1.C: Copy from gcc.dg/if-empty-1.c.

From-SVN: r140780
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/if-empty-1.C [new file with mode: 0644]