public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101054] New: Compiler inconsistently gives error when constexpr class function is called from lambda
@ 2021-06-14 5:25 peter.fletcher at bandicootimaging dot com.au
2021-08-12 23:36 ` [Bug c++/101054] " pinskia at gcc dot gnu.org
2022-03-28 11:08 ` marxin at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: peter.fletcher at bandicootimaging dot com.au @ 2021-06-14 5:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101054
Bug ID: 101054
Summary: Compiler inconsistently gives error when constexpr
class function is called from lambda
Product: gcc
Version: 9.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: peter.fletcher at bandicootimaging dot com.au
Target Milestone: ---
Created attachment 51004
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51004&action=edit
Source code to generate bug and GCC version info
g++ treats a class with a constexpr cast function inconsistently when passed
and captured by a lambda, with one usage producing the error message "error:
use of ‘this’ in a constant expression". The error occurs in g++ 9.4.0 with
-std=c++14 but not with -std=c++17.
Apparently this problem does not occur with Godbolt, but I cannot test this
myself.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/101054] Compiler inconsistently gives error when constexpr class function is called from lambda
2021-06-14 5:25 [Bug c++/101054] New: Compiler inconsistently gives error when constexpr class function is called from lambda peter.fletcher at bandicootimaging dot com.au
@ 2021-08-12 23:36 ` pinskia at gcc dot gnu.org
2022-03-28 11:08 ` marxin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 23:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101054
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks to be fixed in GCC 11+
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/101054] Compiler inconsistently gives error when constexpr class function is called from lambda
2021-06-14 5:25 [Bug c++/101054] New: Compiler inconsistently gives error when constexpr class function is called from lambda peter.fletcher at bandicootimaging dot com.au
2021-08-12 23:36 ` [Bug c++/101054] " pinskia at gcc dot gnu.org
@ 2022-03-28 11:08 ` marxin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-28 11:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101054
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Keywords|needs-bisection |
CC| |marxin at gcc dot gnu.org
Last reconfirmed| |2022-03-28
Status|UNCONFIRMED |NEW
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed with r11-88-g733195e367d84914.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-28 11:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 5:25 [Bug c++/101054] New: Compiler inconsistently gives error when constexpr class function is called from lambda peter.fletcher at bandicootimaging dot com.au
2021-08-12 23:36 ` [Bug c++/101054] " pinskia at gcc dot gnu.org
2022-03-28 11:08 ` marxin 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).