This is the mail archive of the gcc-help@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]

Re: Explicit template instantiation and -fvisibility. Gcc bug?


On Tue, Nov 18, 2008 at 4:23 PM, Ian Lance Taylor <iant@google.com> wrote:
> "Jeroen Wijnhout" <jeroen.wijnhout@gmail.com> writes:
>
>> The cause seems to be the instantiation of
>> DependentTemplatedClass<TemplatedClass<int > >, which induces an
>> instantiation of TemplatedClass<int> as well. However I would expect
>> this instantiation to have public visibility as well, because the
>> DependentTemplatedClass instantiation is public. Is this a GCC bug, or
>> am I doing something wrong here?
>
> The semantics of how visibility should work with C++ classes and
> templates are obscure and probably still not fully pinned down.  There
> has been work in each recent gcc release to address this in various
> ways.  You neglected to mention which version of gcc you are using.  I
> would recommend trying your program with mainline (the future gcc
> 4.4).  If it does not behave as you expect, file a bug report (see
> http://gcc.gnu.org/bugs.html ).  Thanks.

I am using GCC4.3.2 (most recent released version afaik), however I
will try the mainline version.

thanks,
Jeroen


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