public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "lcarreon at bigpond dot net.au" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114862] New: std::uppercase not applying to nan's and inf's Date: Fri, 26 Apr 2024 07:43:12 +0000 [thread overview] Message-ID: <bug-114862-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114862 Bug ID: 114862 Summary: std::uppercase not applying to nan's and inf's Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: lcarreon at bigpond dot net.au Target Milestone: --- The following code: #include <limits> #include <iostream> #include <iomanip> int main() { double values[] = { std::numeric_limits<double>::quiet_NaN(), -std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::signaling_NaN(), -std::numeric_limits<double>::signaling_NaN(), std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() }; for (const auto& value : values) { std::cout << std::uppercase << std::fixed << std::setw(17) << std::left << value << " " << std::fixed << std::setw(10) << std::left << std::setprecision(0) << value << " " << std::fixed << std::setw(15) << std::left << std::setprecision(4) << value << " " << std::fixed << std::setw(17) << std::left << std::setprecision(6) << value << std::endl; } return 0; } Generates the following output: nan nan nan nan -nan -nan -nan -nan nan nan nan nan -nan -nan -nan -nan inf inf inf inf -inf -inf -inf -inf Which in my opinion is incorrect because it is not applying std::uppercase.
next reply other threads:[~2024-04-26 7:43 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-26 7:43 lcarreon at bigpond dot net.au [this message] 2024-04-26 8:47 ` [Bug libstdc++/114862] " redi at gcc dot gnu.org 2024-04-26 9:02 ` redi at gcc dot gnu.org 2024-04-26 11:48 ` redi at gcc dot gnu.org 2024-04-30 22:02 ` redi at gcc dot gnu.org
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: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-114862-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe 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).