public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-7504] libstdc++: Ensure __glibcxx_assert_fail has default visibility
Date: Sat,  5 Mar 2022 20:34:19 +0000 (GMT)	[thread overview]
Message-ID: <20220305203419.B72E73858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:d3a757af21ac330d438aaf5f97fa47d2efed11ea

commit r12-7504-gd3a757af21ac330d438aaf5f97fa47d2efed11ea
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Mar 4 18:23:10 2022 +0000

    libstdc++: Ensure __glibcxx_assert_fail has default visibility
    
    This ensures there's no linker error if libstdc++ headers are included
    following a pragma that sets hidden visibility.
    
    Similarly for std::__terminate, which is always-inline so shouldn't
    matter, but it's not wrong to do this anyway.
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/c++config (__glibcxx_assert_fail): Add visibility
            attribute.
            (__terminate): Likewise.

Diff:
---
 libstdc++-v3/include/bits/c++config | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index c64b61b3c90..6c134f13509 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -305,6 +305,7 @@ namespace std
   // This allows the library to terminate without including all of <exception>
   // and without making the declaration of std::terminate visible to users.
   extern "C++" __attribute__ ((__noreturn__, __always_inline__))
+  _GLIBCXX_VISIBILITY(default)
   inline void __terminate() _GLIBCXX_USE_NOEXCEPT
   {
     void terminate() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__noreturn__));
@@ -554,7 +555,7 @@ namespace std
 {
   // Avoid the use of assert, because we're trying to keep the <cassert>
   // include out of the mix.
-  extern "C++" _GLIBCXX_NORETURN
+  extern "C++" _GLIBCXX_NORETURN _GLIBCXX_VISIBILITY(default)
   void
   __glibcxx_assert_fail(const char* __file, int __line,
 			const char* __function, const char* __condition)


                 reply	other threads:[~2022-03-05 20:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220305203419.B72E73858D1E@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@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).