From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16049 invoked by alias); 24 May 2012 02:02:57 -0000 Received: (qmail 14916 invoked by uid 22791); 24 May 2012 02:02:54 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-gg0-f175.google.com (HELO mail-gg0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 May 2012 02:02:42 +0000 Received: by ggnp4 with SMTP id p4so7660455ggn.20 for ; Wed, 23 May 2012 19:02:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.173.69 with SMTP id bi5mr15253835igc.38.1337824961103; Wed, 23 May 2012 19:02:41 -0700 (PDT) Received: by 10.231.21.16 with HTTP; Wed, 23 May 2012 19:02:41 -0700 (PDT) Date: Thu, 24 May 2012 02:02:00 -0000 Message-ID: Subject: Warning message with usage of visibility hidden with wrapper class From: Christopher Sigman To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-05/txt/msg00178.txt.bz2 Hi all, My team at work and I have started to utilize the=A0visibility attributes in gcc so that we are building 'nix libraries whose public symbols are in-line with our Windows builds. With some of our code though, we're noticing warnings about parts being declared with greater visibility. =A0As far as we've been able to determine, there's nothing being executed incorrectly, but we'd like to understand the warning before ignoring it. The code in question is basically set up like this: class=A0__attribute__ ((visibility ("hidden")))=A0SomeClass { =A0 ... } template class WrappingSomeClass { ... =A0 void someFunc() =A0 { =A0 =A0 SomeClass var; =A0 =A0 ... =A0 } ... } Where the warning occurs on usage of SomeClass in WrappingSomeClass. Any code using this example links to the library with SomeClass in it. Any help you can give would be appreciated, and if my super simplification is overly so, let me know and I can give it in more detail. -- CSS