c++/6758: ICE on nested type in template declaration

ssomers@opnet.com ssomers@opnet.com
Tue May 21 10:36:00 GMT 2002


>Number:         6758
>Category:       c++
>Synopsis:       ICE on nested type in template declaration
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue May 21 10:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stein Somers
>Release:        3.0.4
>Organization:
OPNET Technologies
>Environment:
System: SunOS zweistein 5.6 Generic_105181-20 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

	
host: sparc-sun-solaris2.6
build: sparc-sun-solaris2.6
target: sparc-sun-solaris2.6
configured with: ../gcc-3.0.4/configure  : (reconfigured) ../gcc-3.0.4/configure --with-gnu-ld
>Description:
The code compiled and worked on M$ VC6 SP5, and I'm pretty sure it's legal
(although more indirect than useful).
I verified with truss that I'm only using gcc-3.0.4 headers.

>How-To-Repeat:
Compile this:

        #include <string>
        #include <map>
        template <typename T> class Foo {
            typedef std::map<std::string,T>::allocator_type::reference bar;
        };


>Fix:
Use instead:

            typedef T*& bar;
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list