public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/105619] New: Wrong "used in its own initializer" with class prvalue @ 2022-05-16 15:47 mpolacek at gcc dot gnu.org 2022-05-16 16:48 ` [Bug c++/105619] " jason at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: mpolacek at gcc dot gnu.org @ 2022-05-16 15:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105619 Bug ID: 105619 Summary: Wrong "used in its own initializer" with class prvalue Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- struct A { const A *p = this; }; constexpr A bar (A) { return {}; } constexpr A a = bar (A{}); constexpr auto *p = a.p; // #1 #1 is rejected with 'a' used in its own initializer: $ ./cc1plus -quiet bug.C bug.C:12:21: error: the value of ‘a’ is not usable in a constant expression 12 | constexpr auto *p = a.p; // #1 | ^ bug.C:11:13: note: ‘a’ used in its own initializer 11 | constexpr A a = bar (A{}); | ^ but 'a' is not actually used in the initializer? ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/105619] Wrong "used in its own initializer" with class prvalue 2022-05-16 15:47 [Bug c++/105619] New: Wrong "used in its own initializer" with class prvalue mpolacek at gcc dot gnu.org @ 2022-05-16 16:48 ` jason at gcc dot gnu.org 2022-07-30 22:15 ` pinskia at gcc dot gnu.org 2022-10-27 2:40 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: jason at gcc dot gnu.org @ 2022-05-16 16:48 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105619 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |jason at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed| |2022-05-16 --- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> --- That does look like it ought to work. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/105619] Wrong "used in its own initializer" with class prvalue 2022-05-16 15:47 [Bug c++/105619] New: Wrong "used in its own initializer" with class prvalue mpolacek at gcc dot gnu.org 2022-05-16 16:48 ` [Bug c++/105619] " jason at gcc dot gnu.org @ 2022-07-30 22:15 ` pinskia at gcc dot gnu.org 2022-10-27 2:40 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-07-30 22:15 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105619 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=64989 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think this is a dup of bug 64989. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/105619] Wrong "used in its own initializer" with class prvalue 2022-05-16 15:47 [Bug c++/105619] New: Wrong "used in its own initializer" with class prvalue mpolacek at gcc dot gnu.org 2022-05-16 16:48 ` [Bug c++/105619] " jason at gcc dot gnu.org 2022-07-30 22:15 ` pinskia at gcc dot gnu.org @ 2022-10-27 2:40 ` pinskia at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-10-27 2:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105619 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Yes this is a dup of bug 64989. *** This bug has been marked as a duplicate of bug 64989 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-27 2:40 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-05-16 15:47 [Bug c++/105619] New: Wrong "used in its own initializer" with class prvalue mpolacek at gcc dot gnu.org 2022-05-16 16:48 ` [Bug c++/105619] " jason at gcc dot gnu.org 2022-07-30 22:15 ` pinskia at gcc dot gnu.org 2022-10-27 2:40 ` pinskia 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).