aboutsummaryrefslogtreecommitdiff
path: root/gcc/range-op-float.cc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-04-12 11:55:24 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-04-12 13:15:12 +0100
commit9f10b4957ca6058d1a801c5e4bfe11bf159da809 (patch)
treef629d59ee1176896a45a7f407ab09445c98677e9 /gcc/range-op-float.cc
parent88ed90187ffff3870a9514007672f13476ff96a7 (diff)
downloadgcc-9f10b4957ca6058d1a801c5e4bfe11bf159da809.zip
gcc-9f10b4957ca6058d1a801c5e4bfe11bf159da809.tar.gz
gcc-9f10b4957ca6058d1a801c5e4bfe11bf159da809.tar.bz2
libstdc++: Initialize all members of basic_endpoint union [PR109482]
On Solaris the in_addr struct contains a union and value-initializing it does not make the s_addr member active. This means we can't access that member later during constant evaluation. Make the constructors explicitly set every member that we might want to read later in constexpr member functions. This means even the default constructor can only be constexpr for C++20, because we can't change the active member of a union in older standards. libstdc++-v3/ChangeLog: PR libstdc++/109482 * include/experimental/internet (basic_endpoint::basic_endpoint()): Ensure that the required union members are active. Only define as constexpr for C++20 and later. (basic_endpoint::basic_endpoint(const protocol_type&, port_type)): Likewise. * testsuite/experimental/net/internet/endpoint/cons.cc: Only check constexpr default constructor for C++20 and later. * testsuite/experimental/net/internet/endpoint/extensible.cc: Likewise.
Diffstat (limited to 'gcc/range-op-float.cc')
0 files changed, 0 insertions, 0 deletions