https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81676
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Wed Aug 28 02:22:29 2019 New Revision: 274982 URL: https://gcc.gnu.org/viewcvs?rev=274982&root=gcc&view=rev Log: PR c++/81676 - bogus -Wunused warnings in constexpr if. * semantics.c (maybe_mark_exp_read_r): New function. (finish_if_stmt): Call it on THEN_CLAUSE and ELSE_CLAUSE. * g++.dg/cpp1z/constexpr-if31.C: New test. * g++.dg/cpp1z/constexpr-if32.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp1z/constexpr-if31.C trunk/gcc/testsuite/g++.dg/cpp1z/constexpr-if32.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog