* [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension
@ 2023-11-09 19:25 Arsen Arsenović
2023-11-09 19:25 ` [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted Arsen Arsenović
2023-11-09 23:07 ` [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Jonathan Wakely
0 siblings, 2 replies; 5+ messages in thread
From: Arsen Arsenović @ 2023-11-09 19:25 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Arsen Arsenović
This allows us to add features to freestanding which allow specifying
non-default allocators (generators, collections, ...) without having to
modify them.
libstdc++-v3/ChangeLog:
* include/bits/memoryfwd.h: Remove HOSTED check around allocator
and its specializations.
---
Evening,
This patch adds std::allocator as a declaration to freestanding, so that
it doesn't block various other bits of the library (such as collections
or the generators that I intend to send in soon) from being added to
freestanding anymore.
I don't intend to pull in anything but <generator> into freestanding
in this release, though, so, this patch will have little impact for now.
Testing on x86_64-pc-linux-gnu (the tests are not done yet, but I see no
relevant fails in previous test runs). The follow-up patch also marks a
new test as freestanding (as it was failing).
OK for trunk?
Have a lovely evening!
libstdc++-v3/include/bits/memoryfwd.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/bits/memoryfwd.h b/libstdc++-v3/include/bits/memoryfwd.h
index 330a6df7f44a..2b79cd8880a1 100644
--- a/libstdc++-v3/include/bits/memoryfwd.h
+++ b/libstdc++-v3/include/bits/memoryfwd.h
@@ -60,13 +60,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @{
*/
-#if _GLIBCXX_HOSTED
+ // Included in freestanding as a libstdc++ extension.
template<typename>
class allocator;
template<>
class allocator<void>;
-#endif
#if __cplusplus >= 201103L
/// Declare uses_allocator so it can be specialized in `<queue>` etc.
--
2.42.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted
2023-11-09 19:25 [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Arsen Arsenović
@ 2023-11-09 19:25 ` Arsen Arsenović
2023-11-09 19:34 ` Jonathan Wakely
2023-11-09 23:07 ` [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Jonathan Wakely
1 sibling, 1 reply; 5+ messages in thread
From: Arsen Arsenović @ 2023-11-09 19:25 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Arsen Arsenović
libstdc++-v3/ChangeLog:
* testsuite/20_util/scoped_allocator/noexcept.cc: Mark as
requiring hosted.
---
libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc
index 16992968d3b9..f14eff2c46f5 100644
--- a/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc
+++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc
@@ -1,4 +1,5 @@
// { dg-do compile { target c++11 } }
+// { dg-require-effective-target hosted }
#include <scoped_allocator>
--
2.42.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted
2023-11-09 19:25 ` [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted Arsen Arsenović
@ 2023-11-09 19:34 ` Jonathan Wakely
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Wakely @ 2023-11-09 19:34 UTC (permalink / raw)
To: Arsen Arsenović; +Cc: gcc-patches, libstdc++
On Thu, 9 Nov 2023 at 19:32, Arsen Arsenović <arsen@aarsen.me> wrote:
>
> libstdc++-v3/ChangeLog:
>
> * testsuite/20_util/scoped_allocator/noexcept.cc: Mark as
> requiring hosted.
OK for trunk, thanks.
The test has been backported, but we don't have the hosted et there so
this isn't needed on the branches.
> ---
> libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc b/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc
> index 16992968d3b9..f14eff2c46f5 100644
> --- a/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc
> +++ b/libstdc++-v3/testsuite/20_util/scoped_allocator/noexcept.cc
> @@ -1,4 +1,5 @@
> // { dg-do compile { target c++11 } }
> +// { dg-require-effective-target hosted }
>
> #include <scoped_allocator>
>
> --
> 2.42.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension
2023-11-09 19:25 [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Arsen Arsenović
2023-11-09 19:25 ` [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted Arsen Arsenović
@ 2023-11-09 23:07 ` Jonathan Wakely
2023-11-09 23:09 ` Arsen Arsenović
1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2023-11-09 23:07 UTC (permalink / raw)
To: Arsen Arsenović; +Cc: gcc-patches, libstdc++
On Thu, 9 Nov 2023 at 19:32, Arsen Arsenović <arsen@aarsen.me> wrote:
>
> This allows us to add features to freestanding which allow specifying
> non-default allocators (generators, collections, ...) without having to
> modify them.
>
> libstdc++-v3/ChangeLog:
>
> * include/bits/memoryfwd.h: Remove HOSTED check around allocator
> and its specializations.
> ---
> Evening,
>
> This patch adds std::allocator as a declaration to freestanding, so that
> it doesn't block various other bits of the library (such as collections
> or the generators that I intend to send in soon) from being added to
> freestanding anymore.
>
> I don't intend to pull in anything but <generator> into freestanding
> in this release, though, so, this patch will have little impact for now.
>
> Testing on x86_64-pc-linux-gnu (the tests are not done yet, but I see no
> relevant fails in previous test runs). The follow-up patch also marks a
> new test as freestanding (as it was failing).
>
> OK for trunk?
OK
>
> Have a lovely evening!
>
> libstdc++-v3/include/bits/memoryfwd.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libstdc++-v3/include/bits/memoryfwd.h b/libstdc++-v3/include/bits/memoryfwd.h
> index 330a6df7f44a..2b79cd8880a1 100644
> --- a/libstdc++-v3/include/bits/memoryfwd.h
> +++ b/libstdc++-v3/include/bits/memoryfwd.h
> @@ -60,13 +60,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> * @{
> */
>
> -#if _GLIBCXX_HOSTED
> + // Included in freestanding as a libstdc++ extension.
> template<typename>
> class allocator;
>
> template<>
> class allocator<void>;
> -#endif
>
> #if __cplusplus >= 201103L
> /// Declare uses_allocator so it can be specialized in `<queue>` etc.
> --
> 2.42.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension
2023-11-09 23:07 ` [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Jonathan Wakely
@ 2023-11-09 23:09 ` Arsen Arsenović
0 siblings, 0 replies; 5+ messages in thread
From: Arsen Arsenović @ 2023-11-09 23:09 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches, libstdc++
[-- Attachment #1: Type: text/plain, Size: 139 bytes --]
Jonathan Wakely <jwakely@redhat.com> writes:
> OK
Thanks, pushed (tests did pass).
Have a lovely night.
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-09 23:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 19:25 [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Arsen Arsenović
2023-11-09 19:25 ` [PATCH 2/2] libstdc++: mark 20_util/scoped_allocator/noexcept.cc R-E-T hosted Arsen Arsenović
2023-11-09 19:34 ` Jonathan Wakely
2023-11-09 23:07 ` [PATCH 1/2] libstdc++: declare std::allocator in !HOSTED as an extension Jonathan Wakely
2023-11-09 23:09 ` Arsen Arsenović
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).