aboutsummaryrefslogtreecommitdiff
path: root/libcpp/directives.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2020-12-01 13:38:08 -0700
committerMartin Sebor <msebor@redhat.com>2020-12-01 13:39:46 -0700
commitd02c41dd414dcc65a08bc82f312f7808b5d90028 (patch)
tree1e37ab650d96cc4b1bf719bc64cda60c5b6b8342 /libcpp/directives.c
parentb3147c02dc772ad77eb7e1d5d6e14a8f222d1e65 (diff)
downloadgcc-d02c41dd414dcc65a08bc82f312f7808b5d90028.zip
gcc-d02c41dd414dcc65a08bc82f312f7808b5d90028.tar.gz
gcc-d02c41dd414dcc65a08bc82f312f7808b5d90028.tar.bz2
PR middle-end/97373 - missing warning on sprintf into allocated destination
gcc/ChangeLog: PR middle-end/97373 * builtins.c (compute_objsize): Rename... (compute_objsize_r): to this. Change order and types of arguments. Use new argument. Adjust calls to self. (access_ref::get_ref): New member function. (pointer_query::pointer_query): New member function. (pointer_query::get_ref): Same. (pointer_query::put_ref): Same. (handle_min_max_size): Change order and types of arguments. (maybe_emit_free_warning): Add a test. * builtins.h (class pointer_query): New class. (compute_objsize): Declare an overload. * gimple-ssa-sprintf.c (get_destination_size): Add argument. (handle_printf_call): Change argument type. * tree-ssa-strlen.c (adjust_last_stmt): Add an argument and use it. (maybe_warn_overflow): Same. (handle_builtin_strcpy): Same. (maybe_diag_stxncpy_trunc): Same. (handle_builtin_memcpy): Change argument type. Adjust calls. (handle_builtin_strcat): Same. (handle_builtin_memset): Same. (handle_store): Same. (strlen_check_and_optimize_call): Same. (check_and_optimize_stmt): Same. (strlen_dom_walker): Add new data members. (strlen_dom_walker::before_dom_children): Use new member. (printf_strlen_execute): Dump cache performance counters. Remove objsize pass cleanup. * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Add argument. (handle_printf_call): Change argument type. gcc/testsuite/ChangeLog: PR middle-end/97373 * gcc.dg/tree-ssa/builtin-sprintf-warn-25.c: New test.
Diffstat (limited to 'libcpp/directives.c')
0 files changed, 0 insertions, 0 deletions