public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107710] New: error: ‘constinit’ on function return type is not allowed
@ 2022-11-15 21:20 redi at gcc dot gnu.org
2022-11-15 21:26 ` [Bug c++/107710] error: 'constinit' " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-15 21:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107710
Bug ID: 107710
Summary: error: ‘constinit’ on function return type is not
allowed
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
constinit void (*p)() = nullptr;
With -std=c++20 this is rejected:
func.cc:1:1: error: ‘constinit’ on function return type is not allowed
1 | constinit void (*p)() = nullptr;
| ^~~~~~~~~
Clang and EDG accept it.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/107710] error: 'constinit' on function return type is not allowed
2022-11-15 21:20 [Bug c++/107710] New: error: ‘constinit’ on function return type is not allowed redi at gcc dot gnu.org
@ 2022-11-15 21:26 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-15 21:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107710
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 104066.
*** This bug has been marked as a duplicate of bug 104066 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-15 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 21:20 [Bug c++/107710] New: error: ‘constinit’ on function return type is not allowed redi at gcc dot gnu.org
2022-11-15 21:26 ` [Bug c++/107710] error: 'constinit' " 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).