public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding
@ 2024-04-26 18:05 weidmann at acm dot org
2024-04-28 9:09 ` [Bug libstdc++/114866] " de34 at live dot cn
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: weidmann at acm dot org @ 2024-04-26 18:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Bug ID: 114866
Summary: <memory> & out_ptr in freestanding
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: weidmann at acm dot org
Target Milestone: ---
With gcc version 14.0.1 20240411 (Red Hat 14.0.1-0) (GCC) on x86_64 GNU/Linux.
Using the following command options:
g++ -std=c++23 -fno-rtti -fno-exceptions -fno-non-call-exceptions
-fno-unwind-tables -fno-use-cxa-atexit -fno-enforce-eh-specs -faligned-new
-fsized-deallocation -fpermissive -m32 -ffreestanding -fomit-frame-pointer
-Os -fno-asynchronous-unwind-tables -fno-builtin -Wall -fanalyzer
I get the following error:
In file included from /usr/include/c++/14/memory:95,
...
/usr/include/c++/14/bits/out_ptr.h:57:22: error: ‘__is_shared_ptr’ was not
declared in this scope
57 | static_assert(!__is_shared_ptr<_Smart> || sizeof...(_Args) != 0,
Is #if _GLIBCXX_HOSTED missing around
#if __cplusplus > 202002L
# include <bits/out_ptr.h>
#endif
> As a quick workaround for building my project, I define #define _GLIBCXX_OUT_PTR_H before including <memory>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
@ 2024-04-28 9:09 ` de34 at live dot cn
2024-04-28 12:13 ` arsen at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: de34 at live dot cn @ 2024-04-28 9:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Jiang An <de34 at live dot cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |de34 at live dot cn
--- Comment #1 from Jiang An <de34 at live dot cn> ---
It seems that the primary tempate of __is_shared_ptr should be made available
in freestanding mode.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
2024-04-28 9:09 ` [Bug libstdc++/114866] " de34 at live dot cn
@ 2024-04-28 12:13 ` arsen at gcc dot gnu.org
2024-04-28 16:19 ` [Bug libstdc++/114866] [14/15 Regression] " redi at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: arsen at gcc dot gnu.org @ 2024-04-28 12:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Arsen Arsenović <arsen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arsen at gcc dot gnu.org,
| |jwakely.gcc at gmail dot com
--- Comment #2 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
I read the out_ptr proposal a while back but if memory serves right, I see no
reason why we couldn't add it to our freestanding extensions in GCC 15.
Jonatnan, is this something we should fix+backport also (rather than the full
feature, just add HOSTED to the outptr FTM test and put that in 14)? It could
be considered a regression that <memory> fails to compile.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14/15 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
2024-04-28 9:09 ` [Bug libstdc++/114866] " de34 at live dot cn
2024-04-28 12:13 ` arsen at gcc dot gnu.org
@ 2024-04-28 16:19 ` redi at gcc dot gnu.org
2024-04-30 9:30 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2024-04-28 16:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-04-28
Ever confirmed|0 |1
Summary|<memory> & out_ptr in |[14/15 Regression] <memory>
|freestanding |& out_ptr in freestanding
Status|UNCONFIRMED |NEW
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, this is a regression, and should be fixed in the gcc-14 branch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14/15 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
` (2 preceding siblings ...)
2024-04-28 16:19 ` [Bug libstdc++/114866] [14/15 Regression] " redi at gcc dot gnu.org
@ 2024-04-30 9:30 ` rguenth at gcc dot gnu.org
2024-05-02 11:32 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-30 9:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14/15 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
` (3 preceding siblings ...)
2024-04-30 9:30 ` rguenth at gcc dot gnu.org
@ 2024-05-02 11:32 ` redi at gcc dot gnu.org
2024-05-07 7:45 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2024-05-02 11:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2024-May/650
| |419.html
Keywords| |patch
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650419.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14/15 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
` (4 preceding siblings ...)
2024-05-02 11:32 ` redi at gcc dot gnu.org
@ 2024-05-07 7:45 ` rguenth at gcc dot gnu.org
2024-05-07 13:48 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-07 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|14.0 |14.2
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 14.1 is being released, retargeting bugs to GCC 14.2.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14/15 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
` (5 preceding siblings ...)
2024-05-07 7:45 ` rguenth at gcc dot gnu.org
@ 2024-05-07 13:48 ` cvs-commit at gcc dot gnu.org
2024-05-14 9:50 ` [Bug libstdc++/114866] [14 " cvs-commit at gcc dot gnu.org
2024-05-14 9:54 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-07 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:9927059bb88e966e0a45f09e4fd1193f93df708f
commit r15-284-g9927059bb88e966e0a45f09e4fd1193f93df708f
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu May 2 12:14:52 2024 +0100
libstdc++: Fix <memory> for -std=c++23 -ffreestanding [PR114866]
std::shared_ptr isn't declared for freestanding, so guard uses of it
with #if _GLIBCXX_HOSTED in <bits/out_ptr.h>.
libstdc++-v3/ChangeLog:
PR libstdc++/114866
* include/bits/out_ptr.h [!_GLIBCXX_HOSTED]: Don't refer to
shared_ptr, __shared_ptr or __is_shred_ptr.
* testsuite/20_util/headers/memory/114866.cc: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
` (6 preceding siblings ...)
2024-05-07 13:48 ` cvs-commit at gcc dot gnu.org
@ 2024-05-14 9:50 ` cvs-commit at gcc dot gnu.org
2024-05-14 9:54 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-14 9:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:95055199ee80e526da98c3458308fa345a041d9a
commit r14-10203-g95055199ee80e526da98c3458308fa345a041d9a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu May 2 12:14:52 2024 +0100
libstdc++: Fix <memory> for -std=c++23 -ffreestanding [PR114866]
std::shared_ptr isn't declared for freestanding, so guard uses of it
with #if _GLIBCXX_HOSTED in <bits/out_ptr.h>.
libstdc++-v3/ChangeLog:
PR libstdc++/114866
* include/bits/out_ptr.h [!_GLIBCXX_HOSTED]: Don't refer to
shared_ptr, __shared_ptr or __is_shred_ptr.
* testsuite/20_util/headers/memory/114866.cc: New test.
(cherry picked from commit 9927059bb88e966e0a45f09e4fd1193f93df708f)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libstdc++/114866] [14 Regression] <memory> & out_ptr in freestanding
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
` (7 preceding siblings ...)
2024-05-14 9:50 ` [Bug libstdc++/114866] [14 " cvs-commit at gcc dot gnu.org
@ 2024-05-14 9:54 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2024-05-14 9:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 14.2
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-05-14 9:54 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 18:05 [Bug libstdc++/114866] New: <memory> & out_ptr in freestanding weidmann at acm dot org
2024-04-28 9:09 ` [Bug libstdc++/114866] " de34 at live dot cn
2024-04-28 12:13 ` arsen at gcc dot gnu.org
2024-04-28 16:19 ` [Bug libstdc++/114866] [14/15 Regression] " redi at gcc dot gnu.org
2024-04-30 9:30 ` rguenth at gcc dot gnu.org
2024-05-02 11:32 ` redi at gcc dot gnu.org
2024-05-07 7:45 ` rguenth at gcc dot gnu.org
2024-05-07 13:48 ` cvs-commit at gcc dot gnu.org
2024-05-14 9:50 ` [Bug libstdc++/114866] [14 " cvs-commit at gcc dot gnu.org
2024-05-14 9:54 ` redi 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).