From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14007 invoked by alias); 18 Nov 2008 15:29:13 -0000 Received: (qmail 13927 invoked by uid 22791); 18 Nov 2008 15:29:12 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.170) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Nov 2008 15:28:12 +0000 Received: by ug-out-1314.google.com with SMTP id q7so264289uge.10 for ; Tue, 18 Nov 2008 07:28:09 -0800 (PST) Received: by 10.187.252.4 with SMTP id e4mr671893fas.97.1227022089249; Tue, 18 Nov 2008 07:28:09 -0800 (PST) Received: by 10.187.175.10 with HTTP; Tue, 18 Nov 2008 07:28:09 -0800 (PST) Message-ID: <554ba11a0811180728w128e86f6h4a7cb8fec77af44b@mail.gmail.com> Date: Tue, 18 Nov 2008 15:37:00 -0000 From: "Jeroen Wijnhout" Reply-To: jeroen@wijnhout.com To: "Ian Lance Taylor" Subject: Re: Explicit template instantiation and -fvisibility. Gcc bug? Cc: gcc-help@gcc.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <554ba11a0811170537o7201ca4fo5578b7519c056d8@mail.gmail.com> Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-11/txt/msg00219.txt.bz2 On Tue, Nov 18, 2008 at 4:23 PM, Ian Lance Taylor wrote: > "Jeroen Wijnhout" writes: > >> The cause seems to be the instantiation of >> DependentTemplatedClass >, which induces an >> instantiation of TemplatedClass 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