This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11493] [3.4 regression] tree check ICE in error.c


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11493



------- Additional Comments From bangerth at dealii dot org  2003-07-10 21:04 -------
Confirmed, too. I initially though it might have something to do with the
fact that the namespace and the local typedef have the same name. This
is not the case, as this example shows:
------------------------------
namespace NS {
    struct C {};
    void foo();
}

template <class T> struct X {};

template <class T> struct A {
    A() { foo (X<T>()); }
    void foo(X<T>);
};
template struct A<NS::C>;
------------------------------

This gives the same ICE. I think it has something to do with Koenig lookup,
though, and I think the compiler wants to tell us that the call to foo is
ambiguous (both of the foo functions are candidates, although only one has
the right signature for the call), since if I remove the foo in NS or rename
it, the problem goes away. Of course, the call is not ambiguous.

W.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]