This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44516] unclear error message for invalid operands to operator
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jul 2010 01:47:34 -0000
- Subject: [Bug c++/44516] unclear error message for invalid operands to operator
- References: <bug-44516-13511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2010-07-05 01:47 -------
Note I would keep GCC's wording as it is more correct with respect of C++.
Though I would say what the types are. This is true for any operator. The
reason is that the user could overridden the operator for those types.
That is the following is valid C++ code:
struct WebService { };
struct Server { };
const Server &operator+= (Server const &server, WebService const *a);
void addHTTPService(Server const &server, WebService const
*http) {
server += http;
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|unclear error message for |unclear error message for
|invalid operands to binary |invalid operands to operator
|operator |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44516