From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18881 invoked by alias); 16 Aug 2011 14:17:52 -0000 Received: (qmail 18873 invoked by uid 22791); 16 Aug 2011 14:17:51 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Aug 2011 14:17:36 +0000 From: "ml@convergent-it.at" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50044] Attributes for explicit template instantiation are ignored after an implicit template instantiation occurred. Date: Tue, 16 Aug 2011 14:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ml@convergent-it.at X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg01430.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50044 --- Comment #9 from Martin Lederhilger 2011-08-16 14:17:32 UTC --- Results for: template class INTERFACE A : public Base ... Case one without "extern template": warning is still there but links fine. Case two with "extern template": still undefined reference to `typeinfo for A' I should note that I cannot use INTERFACE on the class template definition, because I want to explicitly instantiate the template in multiple DLLs and then I would need dllimport and dllexport at the same time on the class template definition. For example instantiate A in A.dll, and A in B.dll: When I want to use A and A in B.dll then I would need dllimport and dllexport at the same time. Thats why I want to apply INTERFACE to "extern template INTERFACE...". Output from nm for case two (with "extern template...") generated by i686-mingw32-nm dll.dll | i686-mingw32-c++filt > nm.txt