public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "max.sagebaum at scicomp dot uni-kl.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/104631] Visibility of static member s yields duplicate symbols.
Date: Tue, 22 Feb 2022 09:10:51 +0000	[thread overview]
Message-ID: <bug-104631-4-x2dkgMo2AP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104631-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104631

--- Comment #2 from Max S. <max.sagebaum at scicomp dot uni-kl.de> ---
Ok, thank you for the answer. In the example I can set this for the class but,
in the library it would be problematic. So here the best solution would be to
set the whole library to default.

Since the user should decide how the visibility of the library is, we do not
want to set it to default. Since after all, our library could only be used in a
library of the user and other programs never need to see it.

But we would like to warn the user if our library is included with visibility
hidden. 

Is there a preprocessor macro that can provide this information? 

Or is it possible to detect the visibility of a type during compile time in
order to trigger a static assert?

Thanks.

  parent reply	other threads:[~2022-02-22  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  8:12 [Bug c++/104631] New: " max.sagebaum at scicomp dot uni-kl.de
2022-02-22  8:46 ` [Bug c++/104631] " pinskia at gcc dot gnu.org
2022-02-22  9:10 ` max.sagebaum at scicomp dot uni-kl.de [this message]
2022-04-22 14:58 ` amonakov at gcc dot gnu.org

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=bug-104631-4-x2dkgMo2AP@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).