diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-10-04 12:08:12 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-10-09 14:05:49 +0100 |
commit | 5247ee086f7fff5c6e7cd837478974dbfc2782db (patch) | |
tree | 35822468138779c5879bf92432497b3d183819b8 /gcc | |
parent | c0bc9a153ae6ab649e2fcc3af53ebcd37df0a871 (diff) | |
download | gcc-5247ee086f7fff5c6e7cd837478974dbfc2782db.zip gcc-5247ee086f7fff5c6e7cd837478974dbfc2782db.tar.gz gcc-5247ee086f7fff5c6e7cd837478974dbfc2782db.tar.bz2 |
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).
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions