PR c++/54046
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Nov 2012 16:04:03 +0000 (16:04 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Nov 2012 16:04:03 +0000 (16:04 +0000)
commit6cb25bec2e76666e0630ddc7a4e756cc5ef10e55
tree756c94d3f1786802105c930a7ed81bf4e39c9a8d
parentcd624b70542f340a0ff543967f975c03967df3dd
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
gcc/ChangeLog
gcc/Makefile.in
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/gimple-low.c
gcc/langhooks-def.h
gcc/langhooks.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wreturn-type-8.C [new file with mode: 0644]