diff options
author | Jason Merrill <jason@redhat.com> | 2021-04-14 11:24:50 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-04-29 14:34:05 -0400 |
commit | a9fc64d8120937c5c37e1cacb2f55ae196e8897d (patch) | |
tree | b834aa2d4ec8d322cd495e6eb39d953d0723cf50 /libcpp/files.c | |
parent | 3f0de4dd51fd9a1e9628411b4fd728f5841256fe (diff) | |
download | gcc-a9fc64d8120937c5c37e1cacb2f55ae196e8897d.zip gcc-a9fc64d8120937c5c37e1cacb2f55ae196e8897d.tar.gz gcc-a9fc64d8120937c5c37e1cacb2f55ae196e8897d.tar.bz2 |
c++: constant expressions are evaluated [PR93314]
My GCC 11 patch for PR93314 turned off cp_unevaluated_operand while
processing an id-expression that names a non-static data member, but the
broader issue is that in general, a constant-expression is evaluated even in
an unevaluated operand.
gcc/cp/ChangeLog:
* cp-tree.h (cp_evaluated): Add reset parm to constructor.
* parser.c (cp_parser_constant_expression): Change
allow_non_constant_p to int. Use cp_evaluated.
(cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
* semantics.c (finish_id_expression_1): Don't mess with
cp_unevaluated_operand here.
Diffstat (limited to 'libcpp/files.c')
0 files changed, 0 insertions, 0 deletions