static data member problem

Alexandre Oliva oliva@dcc.unicamp.br
Wed Sep 23 23:51:00 GMT 1998


Jason Merrill <jason@cygnus.com> writes:

>>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:
>> Jason Merrill <jason@cygnus.com> writes:
>>>>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:

>>>> I believe it is the same problem that affects platforms that lack
>>>> ELF weak-symbols: static data members of template classes have to
>>>> be explicitly instantiated on them :-(

>>> Yes, but it's not a bug.  Them's the facts of life on such targets, unless
>>> you have a clever idea...

>> I'm not object-file expert (I'm not even a beginner :-), but, since we 
>> have collect2 on all platforms (don't we?), couldn't we arrange that
>> g++ writes some notes in the object files that collect2 can use to
>> instantiate the missing symbols at link time?

> That's called -frepo.  We could put the annotations in the object files,
> but it would be more work.

But it would get egcs more Standard-compliant on those platforms.
Explicitly instantiating template parameters is no fun, and some
people are trying to write portable packages in C++.  Until this
problem is fixed, widely (?) used systems such as SunOS4 and IRIX5
are hardly going to be supported by template-intensive applications.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list