[Bug c/67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size

2023-08-31 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729 --- Comment #5 from David Binderman --- I just noticed that clang-16.0.6 now implements this check: $ clang++ -c -g -O2 -Wall -Wextra -Wformat=2 -D_FORTIFY_SOURCE=2 sep9a.cc sep9a.cc:13:29: warning: 'fscanf' may overflow; destination buffer in

[Bug c/67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size

2018-12-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c/67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size

2018-12-09 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org,

[Bug c/67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size

2018-12-09 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729 --- Comment #2 from David Binderman --- Three years later, enhancement not implemented. See https://sourceware.org/bugzilla/show_bug.cgi?id=23490 for an example where glibc would have benefited from this enhancement. If someone can give me

[Bug c/67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic