aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2003-06-25 17:29:14 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-06-25 17:29:14 +0000
commit2896d056498b5d84a81e7f1c1b059673e212f675 (patch)
tree01ece93079b1c25dd26e427178410f003ca315e0 /gcc/stmt.c
parent8f7193b854d4f7d433af6e3239f1630700f78f96 (diff)
downloadgcc-2896d056498b5d84a81e7f1c1b059673e212f675.zip
gcc-2896d056498b5d84a81e7f1c1b059673e212f675.tar.gz
gcc-2896d056498b5d84a81e7f1c1b059673e212f675.tar.bz2
re PR c/10178 (ICE in tree_low_cst)
PR 10178 * langhooks.h (struct lang_hooks): Add no_body_blocks bool. * langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): New; default false. * c-lang.c, objc/objc-lang.c: Override LANG_HOOKS_NO_BODY_BLOCKS to true. * stmt.c (is_body_block): If lang_hooks.no_body_blocks, always return 0. From-SVN: r68483
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index b8e1014..426ded3 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -3511,6 +3511,9 @@ int
is_body_block (stmt)
tree stmt;
{
+ if (lang_hooks.no_body_blocks)
+ return 0;
+
if (TREE_CODE (stmt) == BLOCK)
{
tree parent = BLOCK_SUPERCONTEXT (stmt);