public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110855] New: std::source_location doesn't work with C++20 coroutine
@ 2023-07-31 7:37 hewillk at gmail dot com
2023-07-31 23:07 ` [Bug c++/110855] " pinskia at gcc dot gnu.org
2023-07-31 23:11 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: hewillk at gmail dot com @ 2023-07-31 7:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110855
Bug ID: 110855
Summary: std::source_location doesn't work with C++20 coroutine
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
When I try to use source_location to debug C++ coroutine:
auto initial_suspend(const std::source_location location =
std::source_location::current()) {
return std::suspend_never{};
}
I found that gcc does not allow this with:
cc1plus: error: taking address of an immediate function 'static consteval
std::source_location std::source_location::current(__builtin_ret_type)'
In function 'void bar(bar()::_Z3barv.Frame*)':
Not too sure if this is a valid code, although other compilers compile fine.
https://godbolt.org/z/qddrsvsT9
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/110855] std::source_location doesn't work with C++20 coroutine
2023-07-31 7:37 [Bug c++/110855] New: std::source_location doesn't work with C++20 coroutine hewillk at gmail dot com
@ 2023-07-31 23:07 ` pinskia at gcc dot gnu.org
2023-07-31 23:11 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-31 23:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110855
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 55669
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55669&action=edit
full testcase
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/110855] std::source_location doesn't work with C++20 coroutine
2023-07-31 7:37 [Bug c++/110855] New: std::source_location doesn't work with C++20 coroutine hewillk at gmail dot com
2023-07-31 23:07 ` [Bug c++/110855] " pinskia at gcc dot gnu.org
@ 2023-07-31 23:11 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-31 23:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110855
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-07-31
Status|UNCONFIRMED |NEW
Keywords| |rejects-valid
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-31 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-31 7:37 [Bug c++/110855] New: std::source_location doesn't work with C++20 coroutine hewillk at gmail dot com
2023-07-31 23:07 ` [Bug c++/110855] " pinskia at gcc dot gnu.org
2023-07-31 23:11 ` 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).