public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/92505] Using mutable in constexpr
[not found] <bug-92505-4@http.gcc.gnu.org/bugzilla/>
@ 2021-07-13 4:53 ` cjdb.ns at gmail dot com
2021-09-06 16:28 ` arthur.j.odwyer at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: cjdb.ns at gmail dot com @ 2021-07-13 4:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92505
Christopher Di Bella <cjdb.ns at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cjdb.ns at gmail dot com
--- Comment #3 from Christopher Di Bella <cjdb.ns at gmail dot com> ---
Gentle ping, this has started to cause issues in the libc++ GCC CI for ranges.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/92505] Using mutable in constexpr
[not found] <bug-92505-4@http.gcc.gnu.org/bugzilla/>
2021-07-13 4:53 ` [Bug c++/92505] Using mutable in constexpr cjdb.ns at gmail dot com
@ 2021-09-06 16:28 ` arthur.j.odwyer at gmail dot com
2022-09-15 18:04 ` ppalka at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: arthur.j.odwyer at gmail dot com @ 2021-09-06 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92505
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arthur.j.odwyer at gmail dot com
--- Comment #4 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
Confirmed; the test case can be as simple as
// https://godbolt.org/z/M9rf31qqq
struct S { mutable int m; };
static_assert(S{42}.m == 42);
(Removing the "mutable" keyword makes GCC happy.)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/92505] Using mutable in constexpr
[not found] <bug-92505-4@http.gcc.gnu.org/bugzilla/>
2021-07-13 4:53 ` [Bug c++/92505] Using mutable in constexpr cjdb.ns at gmail dot com
2021-09-06 16:28 ` arthur.j.odwyer at gmail dot com
@ 2022-09-15 18:04 ` ppalka at gcc dot gnu.org
2022-09-16 15:11 ` cvs-commit at gcc dot gnu.org
2022-09-18 16:58 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-09-15 18:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92505
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/92505] Using mutable in constexpr
[not found] <bug-92505-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2022-09-15 18:04 ` ppalka at gcc dot gnu.org
@ 2022-09-16 15:11 ` cvs-commit at gcc dot gnu.org
2022-09-18 16:58 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-16 15:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92505
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:7107ea6fb933f1e928593c7e92edfd64ccf0df63
commit r13-2701-g7107ea6fb933f1e928593c7e92edfd64ccf0df63
Author: Patrick Palka <ppalka@redhat.com>
Date: Fri Sep 16 11:10:43 2022 -0400
c++: 'mutable' member within constexpr [PR92505]
This patch permits accessing 'mutable' members of local objects during
constexpr evaluation, while continuing to reject it for global objects
(as in the last line of cpp0x/constexpr-mutable1.C). To distinguish
between the two cases, it looks like it suffices to just check
CONSTRUCTOR_MUTABLE_POSION in cxx_eval_component_reference before
deciding to reject a DECL_MUTABLE_P member access.
PR c++/92505
gcc/cp/ChangeLog:
* constexpr.cc (cxx_eval_component_reference): Check non_constant_p
sooner. In C++14 or later, reject a DECL_MUTABLE_P member access
only if CONSTRUCTOR_MUTABLE_POISION is also set.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-mutable3.C: New test.
* g++.dg/cpp1y/constexpr-mutable1.C: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/92505] Using mutable in constexpr
[not found] <bug-92505-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2022-09-16 15:11 ` cvs-commit at gcc dot gnu.org
@ 2022-09-18 16:58 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-09-18 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92505
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 13.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-18 16:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-92505-4@http.gcc.gnu.org/bugzilla/>
2021-07-13 4:53 ` [Bug c++/92505] Using mutable in constexpr cjdb.ns at gmail dot com
2021-09-06 16:28 ` arthur.j.odwyer at gmail dot com
2022-09-15 18:04 ` ppalka at gcc dot gnu.org
2022-09-16 15:11 ` cvs-commit at gcc dot gnu.org
2022-09-18 16:58 ` ppalka at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).