Files
Stephan Bergmann 921f41924f external/libnumbertext: Silence -Werror,-Wdeprecated-declarations
...when building against emsdk 5.0.2,

> In file included from Numbertext.cxx:6:
> In file included from ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/locale:203:
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:179:1: error: 'wstring_convert<std::codecvt_utf8<wchar_t>>' is deprecated [-Werror,-Wdeprecated-declarations]
>   179 | wstring_convert<_Codecvt, _Elem, _WideAlloc, _ByteAlloc>::to_bytes(const _Elem* __frm, const _Elem* __frm_end) {
>       | ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:83:12: note: in instantiation of member function 'std::wstring_convert<std::codecvt_utf8<wchar_t>>::to_bytes' requested here
>    83 |     return to_bytes(__wstr.data(), __wstr.data() + __wstr.size());
>       |            ^
> Numbertext.cxx:160:22: note: in instantiation of member function 'std::wstring_convert<std::codecvt_utf8<wchar_t>>::to_bytes' requested here
>   160 |     return converter.to_bytes( s );
>       |                      ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__locale_dir/wstring_convert.h:34:7: note: 'wstring_convert<std::codecvt_utf8<wchar_t>>' has been explicitly marked deprecated here
>    34 | class _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert {
>       |       ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__config:740:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
>   740 | #    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
>       |                                         ^
> ~/emsdk/5.0.2/emsdk/emscripten/main/cache/sysroot/include/c++/v1/__config:713:49: note: expanded from macro '_LIBCPP_DEPRECATED'
>   713 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
>       |                                                 ^

So following up on ad6ba4a3a6
"external/libnumbertext: Silence -Werror,-Wdeprecated-declarations", move the
pragma even earlier.

Change-Id: I599c751e703fec4bbffde6b43385236e6f5808d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200731
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2026-03-02 07:47:21 +01:00

13 lines
281 B
Plaintext

--- src/Numbertext.cxx
+++ src/Numbertext.cxx
@@ -1,6 +1,9 @@
* 2018 (c) László Németh
* License: LGPL/BSD dual license */
+#if defined __GNUC__
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
#include <codecvt>
#include <locale>
#include <sstream>