From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [committed] libstdc++: Add std::bit_cast for C++20 [PR 93121]
Date: Thu, 3 Dec 2020 19:32:00 +0000 [thread overview]
Message-ID: <20201203193200.GA2309743@redhat.com> (raw)
In-Reply-To: <20201203192555.GA3795239@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 826 bytes --]
On 03/12/20 19:25 +0000, Jonathan Wakely wrote:
>Thanks to Jakub's addition of the built-in, we can add this to the
>library now. The compiler tests for the built-in are quite extensive,
>including verifying the constraints, so this only adds minimal tests to
>the library testsuite.
>
>This doesn't add a new _GLIBCXX_HAVE_BUILTIN_BIT_CAST because using
>__has_builtin(__builtin_bit_cast) works for GCC and versions of Clang
>that provide the built-in.
>
>libstdc++-v3/ChangeLog:
>
> PR libstdc++/93121
> * include/std/bit (__cpp_lib_bit_cast, bit_cast): Define.
> * include/std/version (__cpp_lib_bit_cast): Define.
> * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: New test.
> * testsuite/26_numerics/bit/bit.cast/version.cc: New test.
This fixes some typos in the new tests.
Tested x86_64-linux. Committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1786 bytes --]
commit 656131e06aa76ba3cb50305c07cf5c8ee79fce44
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Dec 3 19:30:02 2020
libstdc++: Fix typos in #error strings
libstdc++-v3/ChangeLog:
* testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Remove stray
word from copy&paste.
* testsuite/26_numerics/bit/bit.cast/version.cc: Likewise.
diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/bit_cast.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/bit_cast.cc
index b451f152b47..138ceb1c4d6 100644
--- a/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/bit_cast.cc
+++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/bit_cast.cc
@@ -21,9 +21,9 @@
#include <bit>
#ifndef __cpp_lib_bit_cast
-# error "Feature-test macro for bit_cast wait missing in <bit>"
+# error "Feature-test macro for bit_cast missing in <bit>"
#elif __cpp_lib_bit_cast != 201806L
-# error "Feature-test macro for bit_cast wait has wrong value in <bit>"
+# error "Feature-test macro for bit_cast has wrong value in <bit>"
#endif
#include <cstdint>
diff --git a/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/version.cc b/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/version.cc
index 688d44bbb89..82e97543481 100644
--- a/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/version.cc
+++ b/libstdc++-v3/testsuite/26_numerics/bit/bit.cast/version.cc
@@ -21,7 +21,7 @@
#include <version>
#ifndef __cpp_lib_bit_cast
-# error "Feature-test macro for bit_cast wait missing in <version>"
+# error "Feature-test macro for bit_cast missing in <version>"
#elif __cpp_lib_bit_cast != 201806L
-# error "Feature-test macro for bit_cast wait has wrong value in <version>"
+# error "Feature-test macro for bit_cast has wrong value in <version>"
#endif
prev parent reply other threads:[~2020-12-03 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 19:25 Jonathan Wakely
2020-12-03 19:32 ` Jonathan Wakely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201203193200.GA2309743@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).