This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/79879] Integer overflow in functions from scanf() family in MinGW, Cygwin, Borland/Embarcadero C environments


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]