public inbox for
 help / color / mirror / Atom feed
From: Jonathan Wakely <>
Subject: [committed] libstdc++: testsuite: Guard use of C99 std::log2
Date: Tue, 28 Jun 2022 09:31:09 +0100	[thread overview]
Message-ID: <> (raw)

Tested x86_64-linux, poushed to trunk.

-- >8 --

This prevents the test from failing if the only thing not supported is
the text printed to the log about the size of the floating-point type.


	* testsuite/20_util/from_chars/ Only use log2 if C99 math
	functions are available.
 libstdc++-v3/testsuite/20_util/from_chars/ | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libstdc++-v3/testsuite/20_util/from_chars/ b/libstdc++-v3/testsuite/20_util/from_chars/
index dcd9f97c946..c27df4ffa5e 100644
--- a/libstdc++-v3/testsuite/20_util/from_chars/
+++ b/libstdc++-v3/testsuite/20_util/from_chars/
@@ -300,9 +300,11 @@ test_max_mantissa()
   if (Float_limits::is_iec559 && Float_limits::digits < UInt_limits::digits)
     std::printf("Testing %d-bit float, using %zu-bit integer\n",
 	Float_limits::digits + (int)std::log2(Float_limits::max_exponent) + 1,
 	sizeof(UIntT) * __CHAR_BIT__);
     std::from_chars_result res;
     FloatT flt;

                 reply	other threads:[~2022-06-28  8:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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).