[Bug c++/93314] [8/9/10/11 Regression] Invalid use of non-static data member causes ICE in gimplify_expr
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 14 17:48:28 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93314
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:9b53edc796d284b6adec7f2996772dbddf4c341e
commit r11-8181-g9b53edc796d284b6adec7f2996772dbddf4c341e
Author: Jason Merrill <jason@redhat.com>
Date: Wed Apr 14 09:30:05 2021 -0400
c++: non-static member, array bound, sizeof [PR93314]
N2253 allowed referring to non-static data members without an object in
unevaluated operands like that of sizeof, but in a constant-expression
context like an array bound or template argument within such an unevaluated
operand we do actually need a value, so that permission cannot apply.
gcc/cp/ChangeLog:
PR c++/93314
* semantics.c (finish_id_expression_1): Clear
cp_unevaluated_operand
for a non-static data member in a constant-expression.
gcc/testsuite/ChangeLog:
PR c++/93314
* g++.dg/parse/uneval1.C: New test.
More information about the Gcc-bugs
mailing list