[Bug c++/93905] [8 Regression] Cannot use Derived type of Base containing both enum and protected destructor
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 26 08:03:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93905
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f4335f978249a2991620f38e118adf790e677968
commit r8-10082-gf4335f978249a2991620f38e118adf790e677968
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 26 09:02:05 2020 +0100
c++: Fix rejects-valid bug in cxx_eval_outermost_constant_expr [PR93905]
The following testcase is rejected in 8.3, but was accepted in 8.2 and
is in 9.x. This started with my PR87934
* constexpr.c (cxx_eval_constant_expression) <case CONSTRUCTOR>: Do
re-process TREE_CONSTANT CONSTRUCTORs if they aren't reduced constant
expressions.
backport, where the NSDMI CONSTRUCTOR that contains CONST_DECLs is now
constexpr evaluated so that it doesn't contain them. The difference from
9.x is that 9.x doesn't call get_target_expr if we got a CONSTRUCTOR for a
class type for something that has been originally a CONSTRUCTOR too.
This patch cherry-picks just that hunk of the r9-3835 change.
2020-02-26 Jakub Jelinek <jakub@redhat.com>
PR c++/93905
Backported from mainline
2018-11-04 Jason Merrill <jason@redhat.com>
* constexpr.c (cxx_eval_outermost_constant_expr): Don't wrap a
CONSTRUCTOR if one was passed in.
* g++.dg/cpp0x/pr93905.C: New test.
More information about the Gcc-bugs
mailing list