aboutsummaryrefslogtreecommitdiff
path: root/libcpp/system.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-03-15 09:12:33 +0100
committerRichard Biener <rguenther@suse.de>2023-03-16 08:30:10 +0100
commit0a07bfad12530bca5dc5188057ad910198780dbc (patch)
tree62d7bca97a1f207f70d54022470701df02b36e88 /libcpp/system.h
parentadb70c2d1060b3e8d410b45c698796c5d88818b3 (diff)
downloadgcc-0a07bfad12530bca5dc5188057ad910198780dbc.zip
gcc-0a07bfad12530bca5dc5188057ad910198780dbc.tar.gz
gcc-0a07bfad12530bca5dc5188057ad910198780dbc.tar.bz2
tree-optimization/109123 - run -Wuse-afer-free only early
The following switches the -Wuse-after-free diagnostics from emitted during the late access warning passes to the early access warning passes to make sure we run before passes performing code motion run which are the source of a lot of false positives on use-after-free not involving memory operations. The patch also fixes an issue in c-c++-common/Wuse-after-free-6.c and causes the name of the unused pointer to appear in the diagnostic for extra cases in gcc.dg/Wuse-after-free-2.c PR tree-optimization/109123 * gimple-ssa-warn-access.cc (pass_waccess::warn_invalid_pointer): Do not emit -Wuse-after-free late. (pass_waccess::check_call): Always check call pointer uses. * gcc.dg/Wuse-after-free-pr109123.c: New testcase. * gcc.dg/Wuse-after-free-2.c: Amend expected diagnostic with the name of the pointer. * c-c++-common/Wuse-after-free-6.c: Un-XFAIL case.
Diffstat (limited to 'libcpp/system.h')
0 files changed, 0 insertions, 0 deletions