https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116502
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>: https://gcc.gnu.org/g:694b942a179f5fbaee882a5e619e5bbaf64b4d11 commit r14-11735-g694b942a179f5fbaee882a5e619e5bbaf64b4d11 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. (cherry picked from commit 05e4f07cad1eacf869c10622cae2a9cdee3b6a7a)