This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Two problems with egcs-1.1
- To: egcs-bugs at cygnus dot com
- Subject: Two problems with egcs-1.1
- From: Tobias Ringstrom <tori at prosolvia dot se>
- Date: Fri, 24 Jul 1998 09:20:34 +0200 (CEST)
- Cc: egcs at cygnus dot com
- Organization: Prosolvia AB
I sent these bug reports a week ago, but received no response. I'm writing
this to let you now that the bugs are not fixed yet. Please don't get me
wrong, egcs-1.1 is a remarkable compiler. One of the very best in my opinion.
The first one is definately a bug since I get an internal error:
> cat egcs-bug3.cpp
namespace ns {
template <class T> class A {};
}
void foo()
{
ns::A(); // ERROR, missing template argument
}
> g++ -c egcs-bug3.cpp
egcs-bug3.cpp: In function `void foo()':
egcs-bug3.cpp:6: Internal compiler error 373.
egcs-bug3.cpp:6: Please submit a full bug report to `egcs-bugs@cygnus.com'.
The code is erroneous, but egcs should not die like that.
I believe that the second one is also a bug, but I would appreciate your expert
opinion on that:
> cat egcs-bug4.cpp
template <class T> struct A {
void f();
};
typedef A<int> Ai;
#if 0
void A<int>::f() { } // This works
#else
void Ai::f() { } // Error here
#endif
template <class T> void A<T>::f() { }
> g++ -c egcs-bug4.cpp
egcs-bug4.cpp:8: new declaration `void Ai::f<int>()'
egcs-bug4.cpp:2: ambiguates old declaration `void A<int>::f<int>()'
Should I not be able to use the typedef Ai like that? This code used to compile
without errors, but that does not prove anything, of course.
> g++ -v
Reading specs from
/usr/local/egcs-1.1/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.51/specs
gcc version egcs-2.91.51 19980714 (gcc2 ss-980609 experimental)
/ Tobias Ringstrom