Skip to content
Snippets Groups Projects
Commit 31c3b67d authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++; Do not use strtold for hppa-hpux [PR110653]

When I switched std::stold to depend on HAVE_STRTOLD that enabled it for
hppa-hpux which defines HAVE_BROKEN_STRTOLD. Add a check for that macro
so that we don't use strtold, and fall through to the check for double
and long double having the same representation. That should mean we
define a conforming std::stold in terms of std::stod, instead of trying
to use the broken strtold.

Also fix a logic error in the fallback definition of std::stod, which
should not treat zero as a subnormal number.

libstdc++-v3/ChangeLog:

	PR libstdc++/110653
	* include/bits/basic_string.h [!HAVE_STOF] (stof): Do not
	throw an exception for zero result.
	[HAVE_BROKEN_STRTOLD] (stold): Do not use strtold.
parent be16bb88
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment