PR c++/59111
cp/
* search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P.
testsuite/
* g++.dg/cpp0x/pr59111.C: New test.
* g++.dg/cpp1y/pr59110.C: New test.
From-SVN: r206177
+2013-12-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/59111
+ * search.c (lookup_conversions): Return NULL_TREE if !CLASS_TYPE_P.
+
2013-12-20 Trevor saunders <tsaunders@mozilla.com>
* semantics.c (build_anon_member_initialization): Replace
tree list = NULL_TREE;
complete_type (type);
- if (!TYPE_BINFO (type))
+ if (!CLASS_TYPE_P (type) || !TYPE_BINFO (type))
return NULL_TREE;
lookup_conversions_r (TYPE_BINFO (type), 0, 0,
+2013-12-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/59111
+ * g++.dg/cpp0x/pr59111.C: New test.
+ * g++.dg/cpp1y/pr59110.C: New test.
+
2013-12-22 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/x86_64/abi/callabi/func-2a.c (dg-do): Remove
--- /dev/null
+// PR c++/59111
+// { dg-do compile { target c++11 } }
+
+auto& foo(); // { dg-error "type specifier without trailing return type" }
+int i = foo(); // { dg-error "cannot convert" }
--- /dev/null
+// PR c++/59110
+// { dg-options "-std=c++1y" }
+
+int i = *(auto*)0; // { dg-error "cannot convert" }