]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Remove extern "C" from Ryu sources
authorPatrick Palka <ppalka@redhat.com>
Tue, 11 May 2021 17:19:46 +0000 (13:19 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 11 May 2021 17:23:31 +0000 (13:23 -0400)
commit9d6ee0d3c42807596c50569fc01b3f31a6e0900a
tree2dc9c66b1d255c294955fe5b162142acbbc5d664
parent1011bb8bc67cf34c45a9237d72a801a14ad9ef0f
libstdc++: Remove extern "C" from Ryu sources

floating_to_chars.cc includes the Ryu sources into an anonymous
namespace as a convenient way to give all its symbols internal linkage.
But an entity declared extern "C" always has external linkage even
from within an anonymous namespace, so this trick doesn't work in the
presence of extern "C", and it causes the Ryu function generic_to_chars
to be visible from libstdc++.a.

This patch removes the only use of extern "C" from our local copy of
Ryu along with some declarations for never-defined functions that GCC
now warns about.

libstdc++-v3/ChangeLog:

* src/c++17/ryu/LOCAL_PATCHES: Update.
* src/c++17/ryu/ryu_generic_128.h: Remove extern "C".
Remove declarations for never-defined functions.
* testsuite/20_util/to_chars/4.cc: New test.

(cherry picked from commit 84b384a16f388c68166b0603e50d0b477d0830a7)
libstdc++-v3/src/c++17/ryu/LOCAL_PATCHES
libstdc++-v3/src/c++17/ryu/ryu_generic_128.h
libstdc++-v3/testsuite/20_util/to_chars/4.cc [new file with mode: 0644]
This page took 0.064379 seconds and 5 git commands to generate.