From ffe8fd56ff81e2ec9913458c3787d534970dc685 Mon Sep 17 00:00:00 2001 From: mueller Date: Wed, 14 Mar 2007 19:33:17 +0000 Subject: 2007-03-14 Dirk Mueller * c-common.h (empty_body_warning): Rename to empty_if_body_warning. * c-common.c (empty_if_body_warning): Rephrase diagnostic message. * c-parser.c (c_parser_if_body): Always add an empty statement in case of empty body. * c-parser.c (c_parser_do_statement): Warn about empty body in do/while statement. * c-typeck (c_finish_if_stmt): Call empty_if_body_warning. * doc/invoke.texi (-Wempty-body): Update documentation. * cp/semantics.c (c_finish_if_stmt): Call empty_if_body_warning. (finish_do_body): Warn about empty body in do/while statement. * g++.dg/warn/do-empty.C: New. * gcc.dg/do-empty.c: New. * gcc.dg/if-empty-1.c: Update. * gcc.dg/20001116-1.c: Update. * gcc.dg/pr23165.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122928 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c-common.h') diff --git a/gcc/c-common.h b/gcc/c-common.h index b2739c3efb3..08ce4600ee6 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -670,7 +670,7 @@ extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); extern void strict_aliasing_warning (tree, tree, tree); -extern void empty_body_warning (tree, tree); +extern void empty_if_body_warning (tree, tree); extern tree convert_and_check (tree, tree); extern void overflow_warning (tree); extern void warn_logical_operator (enum tree_code, tree, tree); -- cgit v1.2.3