On Tue, Apr 19, 2016 at 03:29:17PM -0400, Jason Merrill wrote: > We've been seeing false positives from these warnings in template code due > to uses not making it through into the instantiation: > > 1) If a pack expansion has no elements > 2) If a parameter used in a trailing-return-type is instantiated into a > dummy distinct from the real instantiation > 3) If a generic lambda that refers to the decl is never instantiated > > Tested x86_64-pc-linux-gnu, applying to trunk.
Looks safe even for 6.1 to me, or if you want to give it more time on trunk, at least for 6.2. But we'll do a rc2 later this week in any case. > commit 16a145d52dcd75c5da6702ca7024a4570abf6d36 > Author: Jason Merrill <ja...@redhat.com> > Date: Wed Mar 2 09:40:14 2016 -0500 > > PR c++/66543 - -Wunused-but-set* false positives > > * expr.c (mark_exp_read): Handle NON_DEPENDENT_EXPR. > * pt.c (make_pack_expansion): Call mark_exp_read. > * semantics.c (finish_id_expression): Call mark_type_use in > unevaluated context. Jakub