diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-10-19 17:03:44 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-10-20 20:46:08 +0200 |
commit | e864d395b4e862cece37abe178e7ebd631b5348b (patch) | |
tree | e98603a69dac2fbaa26c12802bcca7ab1c702e90 /libbacktrace/internal.h | |
parent | 495ec0b2aa808a6463b8c24288a1730cbae1cfca (diff) | |
download | gcc-e864d395b4e862cece37abe178e7ebd631b5348b.zip gcc-e864d395b4e862cece37abe178e7ebd631b5348b.tar.gz gcc-e864d395b4e862cece37abe178e7ebd631b5348b.tar.bz2 |
Convert -Wrestrict pass to ranger.
There is one adjustment to a C++ test which now gives a false positive.
After talking with Martin Sebor, we've concluded this is expected. There
is no way to communicate that libstdc++ allocated objects are always
less than PTRDIFF_MAX.
gcc/ChangeLog:
* calls.c (get_size_range): Adjust to work with ranger.
* calls.h (get_size_range): Add ranger argument to prototype.
* gimple-ssa-warn-restrict.c (class wrestrict_dom_walker): Remove.
(check_call): Pull out of wrestrict_dom_walker into a
static function.
(wrestrict_dom_walker::before_dom_children): Rename to...
(wrestrict_walk): ...this.
(pass_wrestrict::execute): Instantiate ranger.
(class builtin_memref): Add stmt and query fields.
(builtin_access::builtin_access): Add range_query field.
(builtin_memref::builtin_memref): Same.
(builtin_memref::extend_offset_range): Same.
(builtin_access::builtin_access): Make work with ranger.
(wrestrict_dom_walker::check_call): Pull out into...
(check_call): ...here.
(check_bounds_or_overlap): Add range_query argument.
* gimple-ssa-warn-restrict.h (check_bounds_or_overlap):
Add range_query and gimple stmt arguments.
gcc/testsuite/ChangeLog:
* gcc.dg/Wrestrict-22.c: New test.
* g++.dg/torture/pr92421.C: Adjust for ranger.
libstdc++-v3/ChangeLog:
* testsuite/21_strings/basic_string/capacity/1.cc: Pass
-Wno-stringop-overflow to test.
Diffstat (limited to 'libbacktrace/internal.h')
0 files changed, 0 insertions, 0 deletions