[Bug c++/124397] internal compiler error: error reporting routines re-entered with lambda-expr
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 12 00:06:44 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124397
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:2572ce8f1d8f2a27f2d6007848efb27556c52905
commit r16-8015-g2572ce8f1d8f2a27f2d6007848efb27556c52905
Author: Marek Polacek <polacek@redhat.com>
Date: Sun Mar 8 12:34:30 2026 -0400
c++: error routines re-entered with uneval lambda [PR124397]
As discussed in
<https://gcc.gnu.org/pipermail/gcc-patches/2026-March/710075.html>
we shouldn't override complain with tf_warning_or_error when we are
emitting cp_printer diagnostics. We had no way to check that so
this patch adds emitting_diagnostic_p.
PR c++/124397
gcc/cp/ChangeLog:
* pt.cc (tsubst_lambda_expr): Don't override complain when emitting
diagnostics.
gcc/ChangeLog:
* diagnostic.h (emitting_diagnostic_p): New.
* diagnostics/context.h (context::emitting_diagnostic_p): New.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/lambda-uneval30.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Reviewed-by: David Malcolm <dmalcolm@redhat.com>
More information about the Gcc-bugs
mailing list