* cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
* decl.c (finish_enum_value_list): Call them.
+ PR c++/68965
+ * pt.c (tsubst_copy): Mark elements in expanded vector as used.
+
2016-01-18 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/11858
--c_inhibit_evaluation_warnings;
if (TREE_CODE (expanded) == TREE_VEC)
- len = TREE_VEC_LENGTH (expanded);
+ {
+ len = TREE_VEC_LENGTH (expanded);
+ /* Set TREE_USED for the benefit of -Wunused. */
+ for (int i = 0; i < len; i++)
+ TREE_USED (TREE_VEC_ELT (expanded, i)) = true;
+ }
if (expanded == error_mark_node)
return error_mark_node;
+2016-01-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/68965
+ * g++.dg/cpp1y/parameter-pack-1.C: New test.
+ * g++.dg/cpp1y/parameter-pack-2.C: New test.
+
2016-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/69135
--- /dev/null
+// PR c++/68965
+// { dg-do compile { target c++14 } }
+// { dg-options "-Wall -Wextra" }
+
+auto count = [](auto&&... xs)
+{
+ return sizeof...(xs);
+};
+
+struct count_struct
+{
+ template<typename... Ts>
+ auto operator()(Ts&&... xs)
+ {
+ return sizeof...(xs);
+ }
+};
+
+int main()
+{
+ count(1,2,3);
+ count_struct{}(1,2,3);
+}
--- /dev/null
+// PR c++/68965
+// { dg-do compile { target c++14 } }
+// { dg-options "-Wall -Wextra" }
+
+auto count = [](auto&&... xs) // { dg-warning "unused parameter" }
+{
+};
+
+struct count_struct
+{
+ template<typename... Ts>
+ auto operator()(Ts&&... xs) // { dg-warning "unused parameter" }
+ {
+ }
+};
+
+int main()
+{
+ count(1,2,3);
+ count_struct{}(1,2,3);
+}