+2013-02-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/55232
+ * error.c (find_typenames_r): Don't walk into a pack expansion.
+
2013-02-13 Jason Merrill <jason@redhat.com>
PR c++/55670
};
static tree
-find_typenames_r (tree *tp, int * /*walk_subtrees*/, void *data)
+find_typenames_r (tree *tp, int *walk_subtrees, void *data)
{
struct find_typenames_t *d = (struct find_typenames_t *)data;
tree mv = NULL_TREE;
/* Add the typename without any cv-qualifiers. */
mv = TYPE_MAIN_VARIANT (*tp);
+ if (TREE_CODE (*tp) == TYPE_PACK_EXPANSION)
+ {
+ /* Don't mess with parameter packs since we don't remember
+ the pack expansion context for a particular typename. */
+ *walk_subtrees = false;
+ return NULL_TREE;
+ }
+
if (mv && (mv == *tp || !pointer_set_insert (d->p_set, mv)))
vec_safe_push (d->typenames, mv);
--- /dev/null
+// PR c++/55232
+// { dg-do compile { target c++11 } }
+
+struct vector
+{
+ typedef int value_type;
+};
+
+template< class U, class... T >
+struct X
+{
+ void push_back( typename T::value_type ... vals )
+ {
+ U::asoeuth; // { dg-error "" }
+ }
+};
+
+int main()
+{
+ X< int, vector > x;
+ x.push_back( 0 );
+}