[Bug preprocessor/79214] -Wno-system-header defeats strncat buffer overflow warnings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79214 Martin Sebor changed: What|Removed |Added Keywords||diagnostic See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=16358, ||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=78000 --- Comment #1 from Martin Sebor --- See also bug 16358 and bug 78000 for a discussion of the underlying problem.
[Bug preprocessor/79214] -Wno-system-header defeats strncat buffer overflow warnings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79214 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=78989, ||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=71613, ||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=43167 --- Comment #2 from Martin Sebor --- A few other problem reports caused by -Wno-system-header: bug 78989, bug 71613, and bug 43167.
[Bug preprocessor/79214] -Wno-system-header defeats strncat buffer overflow warnings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79214 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2017-01-25 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Martin Sebor --- Testing a patch.
[Bug preprocessor/79214] -Wno-system-header defeats strncat buffer overflow warnings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79214 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #4 from Martin Sebor --- Patch posted for review: https://gcc.gnu.org/ml/gcc-patches/2017-01/msg01994.html
[Bug preprocessor/79214] -Wno-system-header defeats strncat buffer overflow warnings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79214 --- Comment #5 from Martin Sebor --- Author: msebor Date: Thu May 4 20:54:43 2017 New Revision: 247618 URL: https://gcc.gnu.org/viewcvs?rev=247618&root=gcc&view=rev Log: PR preprocessor/79214 - -Wno-system-header defeats strncat buffer overflow warnings PR middle-end/79222 - missing -Wstringop-overflow= on a stpcpy overflow PR middle-end/79223 - missing -Wstringop-overflow on a memmove overflow gcc/ChangeLog: PR preprocessor/79214 PR middle-end/79222 PR middle-end/79223 * builtins.c (check_sizes): Add inlinining context and issue warnings even when -Wno-system-headers is set. (check_strncat_sizes): Same. (expand_builtin_strncat): Same. (expand_builtin_memmove): New function. (expand_builtin_stpncpy): Same. (expand_builtin): Handle memmove and stpncpy. gcc/testsuite/ChangeLog: PR preprocessor/79214 PR middle-end/79222 PR middle-end/79223 * gcc.dg/pr79214.c: New test. * gcc.dg/pr79214.h: New test header. * gcc.dg/pr79222.c: New test. * gcc.dg/pr79223.c: New test. * gcc.dg/pr78138.c: Adjust. * gfortran.dg/unconstrained_commons.f: Same. Added: trunk/gcc/testsuite/gcc.dg/pr79214.c trunk/gcc/testsuite/gcc.dg/pr79214.h trunk/gcc/testsuite/gcc.dg/pr79222.c trunk/gcc/testsuite/gcc.dg/pr79223.c Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr78138.c trunk/gcc/testsuite/gfortran.dg/unconstrained_commons.f
[Bug preprocessor/79214] -Wno-system-header defeats strncat buffer overflow warnings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79214 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to work||8.0 Resolution|--- |FIXED Known to fail||7.0 --- Comment #6 from Martin Sebor --- Fix committed in r247618.