This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47781] warnings from custom printf format specifiers
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Jan 2015 21:55:15 +0000
- Subject: [Bug c/47781] warnings from custom printf format specifiers
- Auto-submitted: auto-generated
- References: <bug-47781-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47781
--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Thu, 29 Jan 2015, tromey at gcc dot gnu.org wrote:
> E.g., firefox has a logging printf that accepts "%hs" to print char16_t*
> strings. This extension means that printf checking can't be used here.
> Requiring a plugin to deal with this situation would also be difficult.
> However letting one write __attribute__((printf, 1, 2, "hs", char16_t*))
> would solve this nicely.
Do you then take this as being length modifier 'h' followed by format
specifier 's', or is it a complete specifier on its own with everything
that would otherwise be length and specifier being reparsed as an
extension if it can't be parsed as a standard format? Do the flags "-wp"
and "cR" for %s formats apply to this format?