This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9665: g++ (GCC) 3.2.1 rejects obvious legal code
- From: yujie dot wu at hec dot utah dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 11 Feb 2003 19:19:18 -0000
- Subject: c++/9665: g++ (GCC) 3.2.1 rejects obvious legal code
- Reply-to: yujie dot wu at hec dot utah dot edu
>Number: 9665
>Category: c++
>Synopsis: g++ (GCC) 3.2.1 rejects obvious legal code
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Feb 11 19:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Yujie Wu
>Release: g++ (GCC) 3.2.1
>Organization:
>Environment:
Cygwin DLL version: 1.3.18 on Windows XP Home Edition Ver 5.1 Build 2600 Service Pack 1
>Description:
g++ 1.cc
1.cc:14: expected 2 levels of template parms for `void AA<T, A>::foo(int)', got 1
1.cc:21: expected 2 levels of template parms for `void AA<T, A>::foo()', got 1
1.cc:5: confused by earlier errors, bailing out
>How-To-Repeat:
template <class T, class A = int >
struct AA
{
void foo( int );
template <typename M> void foo( int );
void foo( );
template <typename M> void foo( );
};
template <class T, class A>
inline void AA<T, A>::foo( int )
{
}
template <class T, class A>
inline void AA<T, A>::foo()
{
}
int main()
{
AA<int> a;
a.foo();
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: