This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: V3 problems
- To: bkoz at nabi dot net
- Subject: Re: V3 problems
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 05 Feb 2001 10:53:03 -0800
- Cc: gcc at gcc dot gnu dot org, dje at watson dot ibm dot com
- Organization: CodeSourcery, LLC
- References: <20010205031113G.mitchell@codesourcery.com><3A7EEE64.C47770D5@nabi.net>
>>>>> "benjamin" == benjamin kosnik <bkoz@nabi.net> writes:
>> If you have time to look at this, that would be very good.
benjamin> ok I'll look at it today. Let me start my build...
See subsequent message. I think you're off the hook, sort -of.
In fact, David has just prodded me into figuring out what's up.
What's up is that we have undefined symbols in the V3 library.
This comes from code similar to this:
template <class T>
struct S {
template <class U>
void f();
void g();
};
template <class T>
template <class U>
void S<T>::f() {}
template <class T>
void S<T>::g() { f<double>(); }
template class S<int>;
Here, note that S<int>::g will be explicitly instantiated, and thus
externally visible on AIX. However, S<int>::f<double> will have
internal linkage, since it is implicitly instantiated and there are no
weak symbols.
Then, if in another file, you do:
template <class T>
struct S {
template <class U>
void f();
void g();
};
int main () {
S<int> si;
si.g();
si.f<double>();
}
you will find that you have unstatisfied externals on AIX.
This means that V3 is not explicitly instantiating enough stuff.
(Anything the library needs to "close" itself must be explicitly
instantiated on AIX.)
I will add the appropriate explicit instantiations; hopefully that
will fix one more round of problems.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com