2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/22256
* decl.c (check_special_function_return_type): Just error
on return type specified for conversion operator.
/testsuite
2007-08-10 Paolo Carlini <pcarlini@suse.de>
PR c++/22256
* g++.dg/conversion/op3.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127331
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-08-10 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/22256
+ * decl.c (check_special_function_return_type): Just error
+ on return type specified for conversion operator.
+
2007-08-09 Daniel Berlin <dberlin@dberlin.org>
* typeck2.c (readonly_error): Handle general expressions.
break;
case sfk_conversion:
- if (type && !same_type_p (type, optype))
- error ("operator %qT declared to return %qT", optype, type);
- else if (type)
- pedwarn ("return type specified for %<operator %T%>", optype);
+ if (type)
+ error ("return type specified for %<operator %T%>", optype);
type = optype;
break;
+2007-08-10 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/22256
+ * g++.dg/conversion/op3.C: New.
+
2007-08-09 Tobias Burnus <burnus@net-b.de>
PR fortran/32987
--- /dev/null
+// PR c++/22256
+
+struct node { int* operator int*(); }; // { dg-error "return type specified" }