This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8702: [3.3 regression] matching of conversion operators
- From: bangerth at dealii 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, rodrigc at gcc dot gnu dot org
- Date: 25 Nov 2002 17:15:54 -0000
- Subject: Re: c++/8702: [3.3 regression] matching of conversion operators
- Reply-to: bangerth at dealii 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, rodrigc at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Old Synopsis: gcc 3.3: "error: template definition of non-template"
New Synopsis: [3.3 regression] matching of conversion operators
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov 25 09:15:52 2002
State-Changed-Why:
True. It's a regression on mainline. Here's a reduced
testcase:
------------------------------------
template <typename X> struct C1{};
template <typename X>
struct C2 {
template<typename Y> operator C1<Y>();
template<typename Y> operator C2<Y>();
};
template<typename X> template<typename Y>
C2<X>::operator C1<Y>()
{
return C1<Y>();
}
---------------------------------
gcc3.3 complains when seeing the definition of the
conversion operator.It is apparently confused by the
second conversion operator, since if I remove that
declaration, everything is fine. 3.2.1 and 2.95 accept
the code as is.
More on conversion operators and templates:
PRs 383, 8572, 8578
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8702