This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9665: g++ (GCC) 3.2.1 rejects obvious legal code


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]