public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6758: ICE on nested type in template declaration
@ 2002-05-21 10:36 ssomers
  0 siblings, 0 replies; 2+ messages in thread
From: ssomers @ 2002-05-21 10:36 UTC (permalink / raw)
  To: gcc-gnats


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/6758: ICE on nested type in template declaration
@ 2002-05-22  6:58 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2002-05-22  6:58 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, ssomers

Synopsis: ICE on nested type in template declaration

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Wed May 22 06:57:59 2002
State-Changed-Why:
    ICE confirmed.  The code is illegal.  The line
                typedef std::map<std::string,T>::allocator_type::reference bar;
    should be replaced by
                typedef typename std::map<std::string,T>::allocator_type::reference bar;

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6758


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-22 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-21 10:36 c++/6758: ICE on nested type in template declaration ssomers
2002-05-22  6:58 lerdsuwa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).