summaryrefslogtreecommitdiff
path: root/gcc/c-common.h
diff options
context:
space:
mode:
authorDirk Mueller <dmueller@suse.com>2006-01-20 09:30:22 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-01-20 09:30:22 +0000
commit74ac79fa800af6de648e984cc5576c20b817839d (patch)
treebc92b7d88bae96e3177ed2217eb031fe56a30961 /gcc/c-common.h
parent577b02d86397e9f5a09392d2ea9f722b8a250709 (diff)
downloadgcc-74ac79fa800af6de648e984cc5576c20b817839d.tar.gz
re PR c++/5520 (Add a warning to detect empty body of if statements (like in the C frontend))
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
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r--gcc/c-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 6da433c6524..ba7dc5cf6e8 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -655,6 +655,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 tree convert_and_check (tree, tree);
extern void overflow_warning (tree);
extern void unsigned_conversion_warning (tree, tree);