public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/37768] bogus warnings on x86_64-mingw32 due to attribute((format(printf))) breakage Date: Wed, 08 Oct 2008 16:16:00 -0000 [thread overview] Message-ID: <20081008161508.21391.qmail@sourceware.org> (raw) In-Reply-To: <bug-37768-7665@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from joseph at codesourcery dot com 2008-10-08 16:15 ------- Subject: Re: New: bogus warnings on x86_64-mingw32 due to attribute((format(printf))) breakage On Wed, 8 Oct 2008, mikpe at it dot uu dot se wrote: > When gcc is configured to generate code for x86_64-pc-mingw32, that is MinGW > for 64-bit Windows, attribute((format(printf))) is redefined by the backend to > be compatible with MSVC's runtime library, which differs significantly from > C99. Correct. This is the conclusion we eventually reached, that "printf" would be for the system formats (e.g. for a function wrapping a call to a system function), that "gnu_printf" would be for the formats accepted by the GNU C Library (including GNU extensions) on all platforms and that "ms_printf" would be for the MSVC formats, on Windows platforms only. > The program below illustrates the issue. It declares a private C99-compliant > snprintf() implementation and invokes it with "%zu" and "%llx" formats. This > triggers the following bogus warnings on x86_64-pc-mingw32: Use gnu_printf for such an implementation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37768
next prev parent reply other threads:[~2008-10-08 16:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-10-08 9:31 [Bug c/37768] New: " mikpe at it dot uu dot se 2008-10-08 16:16 ` joseph at codesourcery dot com [this message] 2008-10-09 7:05 ` [Bug c/37768] " mikpe at it dot uu dot se
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081008161508.21391.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).