/cp
2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67845
* decl.c (grokfndecl): In case of erroneous cv-qualified non-member
functions consistently reset TREE_TYPE (decl) too.
/testsuite
2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/67845
* g++.dg/other/cv_func4.C: New.
From-SVN: r229523
+2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/67845
+ * decl.c (grokfndecl): In case of erroneous cv-qualified non-member
+ functions consistently reset TREE_TYPE (decl) too.
+
2015-10-28 Jason Merrill <jason@redhat.com>
DR 1518
DECL_EXTERNAL (decl) = 1;
if (TREE_CODE (type) == FUNCTION_TYPE)
{
+ if (quals || rqual)
+ TREE_TYPE (decl) = apply_memfn_quals (TREE_TYPE (decl),
+ TYPE_UNQUALIFIED,
+ REF_QUAL_NONE);
+
if (quals)
{
error (ctype
+2015-10-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/67845
+ * g++.dg/other/cv_func4.C: New.
+
2015-10-29 Richard Biener <rguenther@suse.de>
PR middle-end/56956
--- /dev/null
+// PR c++/67845
+
+typedef void F () const;
+
+F foo; // { dg-error "cv-qualifier" }
+void foo ();