]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove std::__unicode::__null_sentinel
authorJonathan Wakely <jwakely@redhat.com>
Mon, 8 Jan 2024 11:46:56 +0000 (11:46 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 8 Jan 2024 16:04:59 +0000 (16:04 +0000)
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.

libstdc++-v3/include/bits/unicode.h
libstdc++-v3/testsuite/17_intro/names.cc

index 66f8399fdfb05d85fcdb37fa9ec7c4089feb7a7d..e49498a0531e9d97410e7d345ca4c5b9828a3426 100644 (file)
@@ -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>
index 5e77e9f2ab000a88a94e4dadf3e2c5fa47e64f3f..53c5aff219d317f505167d8238140e1664486e13 100644 (file)
 
 // 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