https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89615

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh, but it's not failing because of the -finput-charset=ascii option, just
because it includes <bits/extc++.h>, and one of the extension ehaders includes
<iconv.h>.

OK, so then maybe something like this:

--- a/libstdc++-v3/include/ext/codecvt_specializations.h
+++ b/libstdc++-v3/include/ext/codecvt_specializations.h
@@ -35,6 +35,7 @@
 #ifndef _EXT_CODECVT_SPECIALIZATIONS_H
 #define _EXT_CODECVT_SPECIALIZATIONS_H 1

+#if defined __has_include && __has_include(<iconv.h>)
 #include <bits/c++config.h>
 #include <locale>
 #include <iconv.h>
@@ -513,3 +514,4 @@ _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace

 #endif
+#endif

Reply via email to