diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-06-30 14:37:59 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-06-30 15:09:17 +0100 |
commit | d6a6a4ea086d6af97bd7fbd482f51df41c265b79 (patch) | |
tree | 8d9e1c491c529bccc7a813d48c5930ec858cda7c /gcc | |
parent | ca15abc0ff7cb5e821a8c1d69e9b37416d5390c5 (diff) | |
download | gcc-d6a6a4ea086d6af97bd7fbd482f51df41c265b79.zip gcc-d6a6a4ea086d6af97bd7fbd482f51df41c265b79.tar.gz gcc-d6a6a4ea086d6af97bd7fbd482f51df41c265b79.tar.bz2 |
libstdc++: Make std::random_device throw more std::system_error [PR105081]
In r14-289-gf9412cedd6c0e7 I made the std::random_device constructor
throw std::system_error for unrecognized tokens. But it still throws
std::runtime_error for a token such as "rdseed" that is recognized but
not supported at runtime by the CPU the program is running on.
With this change we throw std::system_error for those cases too. This
fixes the following failures on Intel CPUs withour rdseed support:
FAIL: 26_numerics/random/random_device/94087.cc execution test
FAIL: 26_numerics/random/random_device/cons/token.cc execution test
FAIL: 26_numerics/random/random_device/entropy.cc execution test
libstdc++-v3/ChangeLog:
PR libstdc++/105081
* src/c++11/random.cc (random_device::_M_init): Throw
std::system_error when the requested device is a valid token but
not available at runtime.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions