aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-02-21 20:12:21 -0800
committerAndrew Pinski <quic_apinski@quicinc.com>2024-02-22 09:28:39 -0800
commit1076ffda6ce5e6d5fc9577deaf8233e549e5787a (patch)
tree07b3e51ad2ff7d8c60a24afcce3e28eb4d4dd8f7 /libcpp
parent7d8585c0c0e5934780281abdee256ae6553e56e8 (diff)
downloadgcc-1076ffda6ce5e6d5fc9577deaf8233e549e5787a.zip
gcc-1076ffda6ce5e6d5fc9577deaf8233e549e5787a.tar.gz
gcc-1076ffda6ce5e6d5fc9577deaf8233e549e5787a.tar.bz2
warn-access: Fix handling of unnamed types [PR109804]
This looks like an oversight of handling DEMANGLE_COMPONENT_UNNAMED_TYPE. DEMANGLE_COMPONENT_UNNAMED_TYPE only has the u.s_number.number set while the code expected newc.u.s_binary.left would be valid. So this treats DEMANGLE_COMPONENT_UNNAMED_TYPE like we treat function paramaters (DEMANGLE_COMPONENT_FUNCTION_PARAM) and template paramaters (DEMANGLE_COMPONENT_TEMPLATE_PARAM). Note the code in the demangler does this when it sets DEMANGLE_COMPONENT_UNNAMED_TYPE: ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE; ret->u.s_number.number = num; Committed as obvious after bootstrap/test on x86_64-linux-gnu PR tree-optimization/109804 gcc/ChangeLog: * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Handle DEMANGLE_COMPONENT_UNNAMED_TYPE. gcc/testsuite/ChangeLog: * g++.dg/warn/Wmismatched-new-delete-8.C: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions