+2008-12-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/38597
+ * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
+
2008-12-20 Jakub Jelinek <jakub@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
case CAST_EXPR:
write_type (TREE_TYPE (expr));
+ /* There is no way to mangle a zero-operand cast like
+ "T()". */
if (!TREE_OPERAND (expr, 0))
- /* "T()" is mangled as "T(void)". */
- write_char ('v');
+ sorry ("zero-operand casts cannot be mangled due to a defect "
+ "in the C++ ABI");
else if (list_length (TREE_OPERAND (expr, 0)) > 1)
- /* FIXME the above hack for T() needs to be replaced with
- something more general. */
sorry ("mangling function-style cast with more than one argument");
else
write_expression (TREE_VALUE (TREE_OPERAND (expr, 0)));
case VECTOR_TYPE:
case BOOLEAN_TYPE:
case FIXED_POINT_TYPE:
+ case DECLTYPE_TYPE:
return false;
case RECORD_TYPE:
if (TYPE_PTRMEMFUNC_P (type))
+2008-12-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/38597
+ * g++.dg/cpp0x/auto13.C: New test.
+
2008-12-20 Jakub Jelinek <jakub@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
--- /dev/null
+// PR c++/38597
+// { dg-options "-std=c++0x" }
+
+template<class T, class U>
+auto f(T,U) -> decltype(T() + U())
+{ return T() + U(); }
+
+template<class T> void g(T){}
+
+int main() { g(f); } // { dg-error "no matching function" }
+