http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54046
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 14:02:41 UTC --- Author: jakub Date: Fri Feb 1 14:02:33 2013 New Revision: 195651 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195651 Log: Backported from mainline 2012-11-23 Jakub Jelinek <ja...@redhat.com> 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. Added: branches/gcc-4_7-branch/gcc/testsuite/g++.dg/warn/Wreturn-type-8.C Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/Makefile.in branches/gcc-4_7-branch/gcc/cp/ChangeLog branches/gcc-4_7-branch/gcc/cp/cp-objcp-common.c branches/gcc-4_7-branch/gcc/cp/cp-objcp-common.h branches/gcc-4_7-branch/gcc/cp/cp-tree.h branches/gcc-4_7-branch/gcc/gimple-low.c branches/gcc-4_7-branch/gcc/langhooks-def.h branches/gcc-4_7-branch/gcc/langhooks.h branches/gcc-4_7-branch/gcc/testsuite/ChangeLog