Warray-bounds-3.c
18.8 KB
-
PR middle-end/94647 - bogus -Warray-bounds on strncpy into a larger member array… · 3942060c
PR middle-end/94647 - bogus -Warray-bounds on strncpy into a larger member array from a smaller array gcc/ChangeLog: PR middle-end/94647 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Correct the computation of the lower bound of the source access size. (builtin_access::generic_overlap): Remove a hack for setting ranges of overlap offsets. gcc/testsuite/ChangeLog: PR middle-end/94647 * c-c++-common/Warray-bounds-2.c: Adjust a test case and add a new one. * c-c++-common/Warray-bounds-3.c: Add tests for missing warnings. * c-c++-common/Wrestrict.c: Invert bounds in printed ranges. * gcc.dg/Warray-bounds-59.c: New test. * gcc.dg/Wrestrict-10.c: Add a missing warning. * gcc.dg/Wrestrict-5.c: Adjust text of expected warning. * gcc.dg/Wrestrict-6.c: Expect to see a range of overlap offsets.
Martin Sebor committed