public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Patrick Palka <ppalka@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-7159] libstdc++: Ensure headers used by fast_float are included
Date: Wed, 12 Apr 2023 16:40:51 +0000 (GMT)	[thread overview]
Message-ID: <20230412164051.5C7A1385841D@sourceware.org> (raw)

https://gcc.gnu.org/g:13669111e7219ed1f71b2079c7b5794c11f6e3ce

commit r13-7159-g13669111e7219ed1f71b2079c7b5794c11f6e3ce
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Apr 12 12:40:41 2023 -0400

    libstdc++: Ensure headers used by fast_float are included
    
    This makes floating_from_chars.cc explicitly include all headers
    that are used by the original fast_float amalgamation according to
    r12-6647-gf5c8b82512f9d3, except:
    
      1. <cctype> since fast_float doesn't seem to use anything from it
      2. <cinttypes> since fast_float doesn't seem to use anything directly
         from it (this header also pulls in <cstdint>)
      3. <system_error> since std::errc is naturally already available
         from <charconv>
    
    This avoids potential fast_float build failures on platforms for which
    some required headers (in particular <cstdint>) end up not getting
    transitively included from elsewhere.
    
    libstdc++-v3/ChangeLog:
    
            * src/c++17/floating_from_chars.cc: Include <algorithm>,
            <iterator>, <limits> and <cstdint>.

Diff:
---
 libstdc++-v3/src/c++17/floating_from_chars.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libstdc++-v3/src/c++17/floating_from_chars.cc b/libstdc++-v3/src/c++17/floating_from_chars.cc
index 5d18ca32dbb..3a411cf546a 100644
--- a/libstdc++-v3/src/c++17/floating_from_chars.cc
+++ b/libstdc++-v3/src/c++17/floating_from_chars.cc
@@ -30,14 +30,18 @@
 // Prefer to use std::pmr::string if possible, which requires the cxx11 ABI.
 #define _GLIBCXX_USE_CXX11_ABI 1
 
+#include <algorithm>
 #include <array>
 #include <charconv>
 #include <bit>
+#include <iterator>
+#include <limits>
 #include <string>
 #include <memory_resource>
 #include <cfenv>
 #include <cfloat>
 #include <cmath>
+#include <cstdint>
 #include <cstdlib>
 #include <cstring>
 #include <locale.h>

                 reply	other threads:[~2023-04-12 16:40 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:
  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=20230412164051.5C7A1385841D@sourceware.org \
    --to=ppalka@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@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: 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).