Hacker News new | ask | show | jobs
by account42 1343 days ago
> Edit: Looks like GCC removed the warning because it was unreliable. Clang and MSVC seem to be in better shape. https://gcc.gnu.org/legacy-ml/gcc-help/2011-05/msg00360.html

That is an odd position when -Wstringop-overflow also highly depends on the optimizer (and will frequently generate false positives!) but not only remains in GCC but is enabled by default (even without any -Wall/-Wextra).

Things like this are why its pays to compile your project with as many compilers as possible (as well as static analysis tools).

1 comments

Don't forget asan and ubsan. That requires good unit teat coverage to work though.