PR c++/49418
* call.c (cxx_type_promotes_to): Don't strip cv-quals.
* semantics.c (lambda_return_type): Strip them here.
From-SVN: r175271
+2011-06-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/49418
+ * call.c (cxx_type_promotes_to): Don't strip cv-quals.
+ * semantics.c (lambda_return_type): Strip them here.
+
2011-06-21 Andrew MacLeod <amacleod@redhat.com>
* semantics.c: Add sync_ or SYNC__ to builtin names.
return build_pointer_type (TREE_TYPE (type));
if (TREE_CODE (type) == FUNCTION_TYPE)
return build_pointer_type (type);
- if (!MAYBE_CLASS_TYPE_P (type))
- type = cv_unqualified (type);
return type;
}
SET_TYPE_STRUCTURAL_EQUALITY (type);
}
else
- type = type_decays_to (unlowered_expr_type (expr));
+ type = cv_unqualified (type_decays_to (unlowered_expr_type (expr)));
return type;
}
+2011-06-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/49418
+ * g++.dg/template/param3.C: New.
+
2011-06-21 Bernd Schmidt <bernds@codesourcery.com>
* gcc.c-torture/excute/builtin-bitops-1.c (MAKE_FUNS): Make
--- /dev/null
+// PR c++/49418
+
+template <class T>
+void f (const T t)
+{
+ t = 1; // { dg-error "" }
+}
+
+int main()
+{
+ f(1);
+}