c++/292: typename use causes internal compiler error

caustin@vermeermfg.com caustin@vermeermfg.com
Thu Jun 8 13:36:00 GMT 2000


>Number:         292
>Category:       c++
>Synopsis:       typename use causes internal compiler error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 08 13:36:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     caustin@vermeermfg.com
>Release:        2.95.2 19991024
>Organization:
>Environment:
Cygwin/WinNT4
>Description:
It appears that the ANSI C++ typename keyword causes an ICE when it is used to declare that a member of a template parameter is a data type.

For example, MSDN lists this code:

template<class T> class X {
   typename T::Y;      // treat Y as a type

   Y m_y;
};

g++ does not accept that as valid code.
>How-To-Repeat:
Command Line:
g++ -Wall -ansi -o key key.cpp
>Fix:

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


More information about the Gcc-prs mailing list