diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-23 16:04:03 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-23 16:04:03 +0000 |
commit | 6cb25bec2e76666e0630ddc7a4e756cc5ef10e55 (patch) | |
tree | 756c94d3f1786802105c930a7ed81bf4e39c9a8d /gcc/langhooks.h | |
parent | cd624b70542f340a0ff543967f975c03967df3dd (diff) | |
download | gcc-6cb25bec2e76666e0630ddc7a4e756cc5ef10e55.tar.gz |
PR c++/54046
* Makefile.in (gimple-low.o): Depend on langhooks.h.
* gimple-low.c: Include langhooks.c.
(block_may_fallthru): Handle TARGET_EXPR and ERROR_MARK,
by default call lang_hooks.block_may_fallthru.
* langhooks.h (struct lang_hooks): Add block_may_fallthru
langhook.
* langhooks-def.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
(LANG_HOOKS_INITIALIZER): Use it.
* cp-objcp-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Redefine.
* cp-objcp-common.c (cxx_block_may_fallthru): New function.
* cp-tree.h (cxx_block_may_fallthru): New prototype.
* g++.dg/warn/Wreturn-type-8.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193762 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r-- | gcc/langhooks.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/langhooks.h b/gcc/langhooks.h index a9190672920..8481ba46d6c 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -1,6 +1,6 @@ /* The lang_hooks data structure. Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - 2011 Free Software Foundation, Inc. + 2011, 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -456,6 +456,10 @@ struct lang_hooks FUNCTION_DECL for `std::terminate'. */ tree (*eh_protect_cleanup_actions) (void); + /* Return true if a stmt can fallthru. Used by block_may_fallthru + to possibly handle language trees. */ + bool (*block_may_fallthru) (const_tree); + /* True if this language uses __cxa_end_cleanup when the ARM EABI is enabled. */ bool eh_use_cxa_end_cleanup; |