https://gcc.gnu.org/g:fcef30b559d469ee36bce593027ca21aa30007eb
commit r16-5090-gfcef30b559d469ee36bce593027ca21aa30007eb Author: David Malcolm <[email protected]> Date: Fri Nov 7 16:21:06 2025 -0500 analyzer: fix stray trailing "allocated here" text in events Fix event text like this (seen in gcc.dg/analyzer/allocation-size-5.c): 31 | char arr[sizeof (int16_t)]; | ^~~ | | | (1) allocated 2 bytes hereallocated here gcc/analyzer/ChangeLog: * checker-event.cc (region_creation_event_allocation_size::print_desc): Fix missing "else" leading to stray trailing "allocated here" text in events. Signed-off-by: David Malcolm <[email protected]> Diff: --- gcc/analyzer/checker-event.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/analyzer/checker-event.cc b/gcc/analyzer/checker-event.cc index 3e54c2a408c0..57e36d470e80 100644 --- a/gcc/analyzer/checker-event.cc +++ b/gcc/analyzer/checker-event.cc @@ -361,7 +361,8 @@ region_creation_event_allocation_size::print_desc (pretty_printer &pp) const "allocated %qE bytes here", m_capacity); } - pp_printf (&pp, "allocated here"); + else + pp_printf (&pp, "allocated here"); } void
