diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2024-09-26 11:07:41 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2024-09-26 12:55:28 +0100 |
commit | d797202caa34f008399dc65e10cc723f52fcbcc5 (patch) | |
tree | 2ce25cd1d7b5e93a769b8d2f1e9122bbd25ce797 | |
parent | c45844eb7dadcd48e3ce84444a45c270382f7ad1 (diff) | |
download | gcc-d797202caa34f008399dc65e10cc723f52fcbcc5.zip gcc-d797202caa34f008399dc65e10cc723f52fcbcc5.tar.gz gcc-d797202caa34f008399dc65e10cc723f52fcbcc5.tar.bz2 |
libstdc++: Suppress an attribute suggestion warning [PR116853].
This warning is triggering during the build and breaking bootstrap on
at least two targets. The warning appears valid, but the final fix for
it is not yet clear.
In the meantime, to restore bootstrap, the following patch ignores the
warning in the relevant code section.
PR libstdc++/116853
libstdc++-v3/ChangeLog:
* include/bits/basic_string.h: Ignore suggest-attribute=format
warning when using posix vsnprintf in to_string() implementations.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 976577f..e9b17ea 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -4399,6 +4399,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 return __str; } #elif _GLIBCXX_USE_C99_STDIO +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-attribute=format" // NB: (v)snprintf vs sprintf. _GLIBCXX_NODISCARD @@ -4430,6 +4432,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 return __gnu_cxx::__to_xstring<string>(&std::vsnprintf, __n, "%Lf", __val); } +#pragma GCC diagnostic pop #endif // _GLIBCXX_USE_C99_STDIO #if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_WCHAR |