public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108203] New: Format string checking with __USE_MINGW_ANSI_STDIO
@ 2022-12-22 23:33 nightstrike at gmail dot com
2022-12-22 23:38 ` [Bug c++/108203] " pinskia at gcc dot gnu.org
2022-12-23 13:51 ` lh_mouse at 126 dot com
0 siblings, 2 replies; 3+ messages in thread
From: nightstrike at gmail dot com @ 2022-12-22 23:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108203
Bug ID: 108203
Summary: Format string checking with __USE_MINGW_ANSI_STDIO
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nightstrike at gmail dot com
Target Milestone: ---
Circa v4.5, some mingw-w64 users discovered an issue with printf functions and
g++. Addressing this resulted in a kludge on the mingw-w64 headers side, but
this should have been documented here so that we can remove the kludge and have
a better coordination between projects.
Original mail thread describing the problem:
https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/4F05E61C.6010506%40t-online.de/#msg28632591
Bug report that came from it:
https://sourceforge.net/p/mingw-w64/bugs/292/
Header change from fixing the bug report:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/280b5f973e/
This commit might potentially be related:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/1ed6dcc2a19c1aeac5dd4e6530af899fd8d95dbb/
+/* Override __builtin_printf-routines ... Kludge for libstdc++ ...*/
+#define __builtin_vsnprintf __mingw_vsnprintf
+#define __builtin_vsprintf __mingw_vsprintf
I hope with this PR, we can better coordinate and make both sides better :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/108203] Format string checking with __USE_MINGW_ANSI_STDIO
2022-12-22 23:33 [Bug c++/108203] New: Format string checking with __USE_MINGW_ANSI_STDIO nightstrike at gmail dot com
@ 2022-12-22 23:38 ` pinskia at gcc dot gnu.org
2022-12-23 13:51 ` lh_mouse at 126 dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-22 23:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108203
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=95130
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect this is a dup of bug 95130
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/108203] Format string checking with __USE_MINGW_ANSI_STDIO
2022-12-22 23:33 [Bug c++/108203] New: Format string checking with __USE_MINGW_ANSI_STDIO nightstrike at gmail dot com
2022-12-22 23:38 ` [Bug c++/108203] " pinskia at gcc dot gnu.org
@ 2022-12-23 13:51 ` lh_mouse at 126 dot com
1 sibling, 0 replies; 3+ messages in thread
From: lh_mouse at 126 dot com @ 2022-12-23 13:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108203
--- Comment #2 from LIU Hao <lh_mouse at 126 dot com> ---
(In reply to nightstrike from comment #0)
> Bug report that came from it:
> https://sourceforge.net/p/mingw-w64/bugs/292/
>
I think this should be no longer the case. Two years ago I submitted a patch
that made the `ms_printf` attribute accept `%lld`, so there is now a universal
modifier for `long long`.
The issue here looks like that `printf` , which is a 'well known' function to
GCC, has a pre-defined attribute. If a new `*_printf` attribute is declared, it
gets both, as pointed out by Andrew Pinski.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-23 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-22 23:33 [Bug c++/108203] New: Format string checking with __USE_MINGW_ANSI_STDIO nightstrike at gmail dot com
2022-12-22 23:38 ` [Bug c++/108203] " pinskia at gcc dot gnu.org
2022-12-23 13:51 ` lh_mouse at 126 dot com
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).