[Bug tree-optimization/91890] [10 Regression] -Warray-bounds warning testing glibc not suppressed by pragma
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 5 21:03:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91890
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:
https://gcc.gnu.org/g:55ace4d14637866466498ed43e02d6f95af98f10
commit r10-7049-g55ace4d14637866466498ed43e02d6f95af98f10
Author: Jeff Law <law@redhat.com>
Date: Thu Mar 5 14:01:30 2020 -0700
Fix location maybe_diag_overlap passes to diagnostics so that diagnostic
pragmas work better.
PR tree-optimization/91890
* gimple-ssa-warn-restrict.c (maybe_diag_overlap): Remove LOC argument.
Use gimple_or_expr_nonartificial_location.
(check_bounds_overlap): Drop LOC argument to maybe_diag_access_bounds.
Use gimple_or_expr_nonartificial_location.
* gimple.c (gimple_or_expr_nonartificial_location): New function.
* gimple.h (gimple_or_expr_nonartificial_location): Declare it.
* tree-ssa-strlen.c (maybe_warn_overflow): Use
gimple_or_expr_nonartificial_location.
(maybe_diag_stxncpy_trunc, handle_builtin_stxncpy_strncat): Likewise.
(maybe_warn_pointless_strcmp): Likewise.
* gcc.dg/pragma-diag-8.c: New test.
More information about the Gcc-bugs
mailing list