[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c++/110242] ICE on valid (decltype with lambda)
From:       "mpolacek at gcc dot gnu.org via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date:       2024-02-29 20:28:50
Message-ID: bug-110242-4-TJ47ogzAnf () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110242

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We're trying to emit the "no return statement in function returning non-void"
warning, which triggers dump_template_bindings:

 493       push_deferring_access_checks (dk_no_check);
 494       t = tsubst (t, args, tf_none, NULL_TREE);
 495       pop_deferring_access_checks ();

The tsubst leads to tsubst_lambda_expr with complain=tf_none, but there we have

19748       tree body = start_lambda_function (fn, r);

which has no complain, and in it, push_template_decl warns about

5883       warning (OPT_Wtemplates, "template %qD declared", decl);

so we crash.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic