public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/10554: ICE with illegal using declaration
@ 2003-04-29 19:56 reichelt
  0 siblings, 0 replies; 2+ messages in thread
From: reichelt @ 2003-04-29 19:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10554
>Category:       c++
>Synopsis:       ICE with illegal using declaration
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 19:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Volker Reichelt
>Release:        gcc 3.4-20030402
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Consider the following code snippet:

-------------------------------snip here------------------------
template <typename> struct A
{
    typedef A X;
    void foo();
};

template <typename T> struct B : A<T>
{
    using X::foo;
};
-------------------------------snip here------------------------

X is declared in template class A and there's a using declaration in a
derived class that uses X. The using declaration is illegal, it should
of course read "using A<T>::X::foo;".

Alternatively one could add a "using typename A<T>::X;" before (which
presently does not work due to PR 9447).

Due to incorrect name lookup the above code compiles with gcc 3.2.x and
3.3 branch. With mainline we get an ICE:

PR8582C.cc:9: error: `X' is not a class-name or namespace-name
PR8582C.cc:9: error: expected nested-name-specifier
PR8582C.cc:9: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

So we have an ice-on-illegal-code (error recovery problem) on mainline
which is not a regression. The situation is actually an improvement
on mainline, because we had an accepts-illegal before and now we only have
an error recovery problem. But it's still a bug.
>How-To-Repeat:

>Fix:

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


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

* Re: c++/10554: ICE with illegal using declaration
@ 2003-04-29 19:59 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-04-29 19:59 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, reichelt

Synopsis: ICE with illegal using declaration

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Apr 29 19:59:51 2003
State-Changed-Why:
    Confirmed. This regression is an effect of two-stage
    name lookup -- 3.3 simply didn't try to look up some
    identifiers which we now want to check.
    
    W.

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


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

end of thread, other threads:[~2003-04-29 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 19:56 c++/10554: ICE with illegal using declaration reichelt
2003-04-29 19:59 bangerth

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).