public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christopher Sigman <c.s.sigman@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Warning message with usage of visibility hidden with wrapper class
Date: Thu, 24 May 2012 02:02:00 -0000	[thread overview]
Message-ID: <CANW=5yAEqA_uWssFZzvr6JSuQwOQMTOKHpq9ShPKJK94DhhQxA@mail.gmail.com> (raw)

Hi all,

My team at work and I have started to utilize the visibility
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.  As 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 __attribute__ ((visibility ("hidden"))) SomeClass
{
  ...
}

template <T>
class WrappingSomeClass
{
...
  void someFunc()
  {
    SomeClass var;
    ...
  }
...
}

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

             reply	other threads:[~2012-05-24  2:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  2:02 Christopher Sigman [this message]
2012-05-24 10:05 ` Jonathan Wakely
2012-05-31  1:42 ` Christopher Sigman
2012-05-31  9:03   ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANW=5yAEqA_uWssFZzvr6JSuQwOQMTOKHpq9ShPKJK94DhhQxA@mail.gmail.com' \
    --to=c.s.sigman@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).