https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116969
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:5247ee086f7fff5c6e7cd837478974dbfc2782db commit r15-4215-g5247ee086f7fff5c6e7cd837478974dbfc2782db Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Oct 4 12:08:12 2024 +0100 libstdc++: Drop format attribute from snprintf wrapper [PR116969] When __LONG_DOUBLE_IEEE128__ is defined we need to declare a wrapper for Glibc's 'snprintf' symbol, so we can call the original definition that works with the IBM128 format of long double. Because we were declaring the wrapper using __typeof__(__builtin_snprintf) it inherited the __attribute__((format(printf, 3, 4))) decoration, and then we got a warning for calling that wrapper with an __ibm128 argument for a %Lf conversion specifier. The warning is bogus, because the function we're calling really does want __ibm128 for %Lf, but there's no "printf but with a different long double format" archetype for the attribute. In r15-4039-g28911f626864e7 I added a diagnostic pragma to suppress the warning, but it would be better to just declare the wrapper without the attribute, and not have to suppress a warning for code that we know is actually correct. libstdc++-v3/ChangeLog: PR libstdc++/116969 * include/bits/locale_facets_nonio.tcc (money_put::__do_put): Remove diagnostic pragmas. (__glibcxx_snprintfibm128): Declare type manually, instead of using __typeof__(__builtin_snprintf).