This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/765: Friend function can not have same name of a memeber function
- From: neil at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, xiao at dr dot com
- Date: 1 Jan 2003 16:05:34 -0000
- Subject: Re: c++/765: Friend function can not have same name of a memeber function
- Reply-to: neil at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, xiao at dr dot com, gcc-gnats at gcc dot gnu dot org
Synopsis: Friend function can not have same name of a memeber function
State-Changed-From-To: analyzed->closed
State-Changed-By: neil
State-Changed-When: Wed Jan 1 08:05:33 2003
State-Changed-Why:
This is fixed in 3.4; it gives the following correct diagnosis:
/tmp/6807.ii:19: error: declaration of `operator-' as non-function
/tmp/6807.ii:19: error: expected function-definition
/tmp/6807.ii: In function `TForwardDeclarationBug<T> operator-(const
TForwardDeclarationBug<T>&, const TForwardDeclarationBug<T>&) [with T = int]
':
/tmp/6807.ii:34: instantiated from here
/tmp/6807.ii:5: error: `int TForwardDeclarationBug<int>::a_' is private
/tmp/6807.ii:28: error: within this context
/tmp/6807.ii:5: error: `int TForwardDeclarationBug<int>::a_' is private
/tmp/6807.ii:28: error: within this context
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=765