c++/2070: syntax error in correct code

igodard@rational.com igodard@rational.com
Fri Feb 23 08:16:00 GMT 2001


>Number:         2070
>Category:       c++
>Synopsis:       syntax error in correct code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 23 08:16:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ivan Godard
>Release:        3.0 (Code Sorcery online test compiler); also 2.95
>Organization:
>Environment:
Linux pine 2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown
>Description:
Compilation of test case gives (v3.0):

/tmp/@23085.7.cc: In static member function `static void D::G()':
/tmp/@23085.7.cc:14: parse error before `;' token
/tmp/@23085.7.cc:16: parse error before `;' token
>How-To-Repeat:
template<class A> class C {
public:
    template<class B>static void F() {B b;}
    A a;
    };
    
template<class dummy> class D {
public:
class C1 { public: int i; };
class C2 { public: int i; };
static void G() {
    C1 c1;
    C<int>::F<int>();
    C<C1>::F<int>();
    C<int>::F<C2>();
    C<C1>::F<C2>();
    }
};
int main() { D<void>::G(); }
>Fix:
none
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list