2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33972
* decl.c (grokdeclarator): Do not early check for operator-function-id
as non-function.
/testsuite
2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33972
* g++.dg/other/operator3.C: New.
* g++.dg/template/operator8.C: Adjust.
* g++.dg/template/operator9.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211944
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/33972
+ * decl.c (grokdeclarator): Do not early check for operator-function-id
+ as non-function.
+
2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
* class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
return error_mark_node;
}
- if (((dname && IDENTIFIER_OPNAME_P (dname)) || flags == TYPENAME_FLAG)
+ if (flags == TYPENAME_FLAG
&& innermost_code != cdk_function
&& ! (ctype && !declspecs->any_specifiers_p))
{
+2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/33972
+ * g++.dg/other/operator3.C: New.
+ * g++.dg/template/operator8.C: Adjust.
+ * g++.dg/template/operator9.C: Likewise.
+
2014-06-24 Alan Lawrence <alan.lawrence@arm.com>
* gcc.target/aarch64/singleton_intrinsics_1.c: Save temps and cleanup.
--- /dev/null
+// PR c++/33972
+
+struct s
+{
+ typedef void f(void);
+ f operator();
+};
struct A
{
- template<operator+> void foo() {} // { dg-error "identifier|non-function|template arguments" }
+ template<operator+> void foo() {} // { dg-error "identifier|parameter|template arguments" }
};
//PR c++/27670
-template<operator+> void foo(); // { dg-error "before|non-function|template" }
+template<operator+> void foo(); // { dg-error "before|parameter|template" }
void bar()
{