aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/f95-lang.cc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2025-03-27 15:03:18 -0400
committerMarek Polacek <polacek@redhat.com>2025-03-31 10:35:12 -0400
commitc7eec82942496520d6b0604aa945a89f279e2562 (patch)
treec271be3897aa104883d5e2ee077bc901a1964ca7 /gcc/fortran/f95-lang.cc
parent432f0dd62c3b29efbc0b8a1650c05c370477c0b6 (diff)
downloadgcc-c7eec82942496520d6b0604aa945a89f279e2562.zip
gcc-c7eec82942496520d6b0604aa945a89f279e2562.tar.gz
gcc-c7eec82942496520d6b0604aa945a89f279e2562.tar.bz2
c++: fix reporting routines re-entered [PR119303]
We crash while we call warning_at ("inline function used but never defined") since it invokes dump_template_bindings -> tsubst -> ... -> convert_like -> ... -> c_common_truthvalue_conversion -> warning_at ("enum constant in boolean context") cp_truthvalue_conversion correctly gets complain=0 but it calls c_common_truthvalue_conversion from c-family which doesn't have a similar parameter. We can fix this by tweaking diagnostic_context::report_diagnostic to check for recursion after checking if the diagnostic was enabled. PR c++/116960 PR c++/119303 gcc/ChangeLog: * diagnostic.cc (diagnostic_context::report_diagnostic): Check for non-zero m_lock later, after checking diagnostic_enabled. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-uneval26.C: New test. * g++.dg/warn/undefined2.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/fortran/f95-lang.cc')
0 files changed, 0 insertions, 0 deletions