https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104494
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org Keywords| |diagnostic --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- I think the attribute suggestion happens with some IPA analysis which figures the lambda is after inlining the lambda but the diagnostic about a noreturn function returning happens before. That would mean the attribute suggestion should be based on local analysis only, not using IPA discovered noreturn. Not sure how that's easily possible. We don't suggest noreturn for the lambda because the C++ FE says it's OK to miss it there.