diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-02-24 10:08:26 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-02-24 14:23:36 +0000 |
commit | 36ecfb75e053d54dd36dd3900d3096004f6d9aae (patch) | |
tree | ad5466885c5735d1deb21b2457df843d2dd87cd4 /gcc/fortran/frontend-passes.cc | |
parent | 363f0ef50bd143fce77a1c7905b0ed707f4a9358 (diff) | |
download | gcc-36ecfb75e053d54dd36dd3900d3096004f6d9aae.zip gcc-36ecfb75e053d54dd36dd3900d3096004f6d9aae.tar.gz gcc-36ecfb75e053d54dd36dd3900d3096004f6d9aae.tar.bz2 |
libstdc++: Fix conversion to/from net::ip::address_v4::bytes_type
I messed up the endianness of the address_v4::bytes_type array, which
should always be in network byte order. We can just use bit_cast to
convert the _M_addr member to/from bytes_type.
libstdc++-v3/ChangeLog:
* include/experimental/internet (address_4(const bytes_type&)):
Use __builtin_bit_cast if available, otherwise convert to
network byte order.
(address_v4::to_bytes()): Likewise, but convert from network
byte order.
* testsuite/experimental/net/internet/address/v4/cons.cc: Fix
incorrect tests. Check for constexpr too.
* testsuite/experimental/net/internet/address/v4/creation.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc:
Check that bytes_type is a standard-layout type.
Diffstat (limited to 'gcc/fortran/frontend-passes.cc')
0 files changed, 0 insertions, 0 deletions