c++/9849: malformed template typename produces strange diagnostic

zak@transversal.com zak@transversal.com
Tue Feb 25 15:46:00 GMT 2003


>Number:         9849
>Category:       c++
>Synopsis:       malformed template typename produces strange diagnostic
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 25 15:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     zak@transversal.com
>Release:        unknown-1.0
>Organization:
>Environment:
Debian (unstable); locally-compiled gcc 3.2.1
>Description:
The following code produces the error:

test.cc:8: sorry, not implemented: `tree_vec' not supported by dump_expr

which isn't very helpful -- the problem is in fact a missing "template" keyword before C2<U>.


template<class T> struct C1
{
  template<class U> struct C2
  { class Type { }; };
};

template<class T, class U>
void foo(typename C1<T>::C2<U>::Type *) { }
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list