This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/79879] Integer overflow in functions from scanf() family in MinGW, Cygwin, Borland/Embarcadero C environments
- From: "wyporek at poczta dot onet.pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 05 Mar 2017 21:11:41 +0000
- Subject: [Bug c/79879] Integer overflow in functions from scanf() family in MinGW, Cygwin, Borland/Embarcadero C environments
- Auto-submitted: auto-generated
- References: <bug-79879-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79879
--- Comment #13 from Lukas Wyporek <wyporek at poczta dot onet.pl> ---
OK, so we can compile with -Wformat=2 (which can be used instead of group
"-Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k"):
gcc main.c -o main.exe -Wall -Wextra -Wformat=2
and the compiler will warn about that format is not string literal:
"warning: format not a string literal, argument types not checked"
Thank you Andrew,
Are you Polish maybe?