https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116502
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Arsen Arsenovic <ar...@gcc.gnu.org>: https://gcc.gnu.org/g:05e4f07cad1eacf869c10622cae2a9cdee3b6a7a commit r15-3921-g05e4f07cad1eacf869c10622cae2a9cdee3b6a7a Author: Arsen ArsenoviÄ <ar...@aarsen.me> Date: Wed Aug 28 21:59:18 2024 +0200 c++/coro: prevent ICV_STATEMENT diagnostics in temp promotion [PR116502] If such a diagnostic is necessary, it has already been emitted, otherwise, it is not correct and emitting it here is inactionable by the user, and bogus. PR c++/116502 gcc/cp/ChangeLog: * coroutines.cc (maybe_promote_temps): Convert temporary initializers to void without complaining. gcc/testsuite/ChangeLog: * g++.dg/coroutines/maybe-unused-1.C: New test. * g++.dg/coroutines/pr116502.C: New test.