public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7007] libstdc++: Remove std::__unicode::__null_sentinel
@ 2024-01-08 16:13 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2024-01-08 16:13 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:eb846114ed7c49e426fccb826a3f81b7abbc84be
commit r14-7007-geb846114ed7c49e426fccb826a3f81b7abbc84be
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Jan 8 11:46:56 2024 +0000
libstdc++: Remove std::__unicode::__null_sentinel
The name __null_sentinel is defined as a macro by newlib, so we can't
use it as an identifier. That variable is not actually used by
libstdc++, it was added because P2728R6 proposes std::uc::null_sentinel.
Since we don't need it and it breaks bootstrap for newlib targets, just
remove it. A null sentinel can still be used by constructing a
_Null_sentinel_t object as needed, rather than having a named object of
that type predefined.
libstdc++-v3/ChangeLog:
* include/bits/unicode.h (__null_sentinel): Remove.
* testsuite/17_intro/names.cc: Add __null_sentinel.
Diff:
---
libstdc++-v3/include/bits/unicode.h | 2 --
libstdc++-v3/testsuite/17_intro/names.cc | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/bits/unicode.h b/libstdc++-v3/include/bits/unicode.h
index 66f8399fdfb..e49498a0531 100644
--- a/libstdc++-v3/include/bits/unicode.h
+++ b/libstdc++-v3/include/bits/unicode.h
@@ -83,8 +83,6 @@ namespace __unicode
{ return *__it == iter_value_t<_It>{}; }
};
- inline constexpr _Null_sentinel_t __null_sentinel;
-
template<typename _FromFmt, typename _ToFmt,
input_iterator _Iter, sentinel_for<_Iter> _Sent = _Iter,
typename _ErrorHandler = _Repl>
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index 5e77e9f2ab0..53c5aff219d 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -140,6 +140,7 @@
// These clash with newlib so don't use them.
# define __lockable cannot be used as an identifier
+# define __null_sentinel cannot be used as an identifier
# define __packed cannot be used as an identifier
# define __unused cannot be used as an identifier
# define __used cannot be used as an identifier
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-08 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-08 16:13 [gcc r14-7007] libstdc++: Remove std::__unicode::__null_sentinel Jonathan Wakely
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).