Andrew Pinski 971df602e0 Fix PR c++/66590: incorrect warning "reaches end of non-void function" for switch
So the problem here is there is code in the C++ front-end not to add a
break statement (to the IR) if the previous block does not fall through.
The problem is the code which does the check to see if the block
may fallthrough does not check a CLEANUP_STMT; it assumes it is always
fall through.  Anyways this adds the code for the case of a CLEANUP_STMT
that is only for !CLEANUP_EH_ONLY (the try/finally case).

OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/cp/ChangeLog:

	PR c++/66590
	* cp-objcp-common.c (cxx_block_may_fallthru): Handle
	CLEANUP_STMT for the case which will be try/finally.

gcc/testsuite/ChangeLog:

	PR c++/66590
	* g++.dg/warn/Wreturn-5.C: New test.
2021-08-25 21:27:18 +00:00
2021-08-19 00:16:42 +00:00
2021-08-25 00:16:57 +00:00
2021-08-24 00:17:00 +00:00
2021-08-18 00:16:48 +00:00
2021-08-25 00:16:57 +00:00
2021-08-24 00:17:00 +00:00
2021-08-24 00:17:00 +00:00
2021-08-25 00:16:57 +00:00
2021-08-22 00:16:40 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 3.1 GiB
Languages
C 48%
Ada 18.3%
C++ 14.1%
Go 7%
GCC Machine Description 4.6%
Other 7.7%