]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: [_GLIBCXX_INLINE_VERSION] Un-weak handle_contract_violation
authorFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 30 Oct 2023 18:35:35 +0000 (19:35 +0100)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Mon, 30 Oct 2023 20:49:31 +0000 (21:49 +0100)
libstdc++-v3/ChangeLog:

* src/experimental/contract.cc
[_GLIBCXX_INLINE_VERSION](handle_contract_violation): Rework comment.
Remove weak attribute.

libstdc++-v3/src/experimental/contract.cc

index d550b49c4eb4993cf1128177be301053f4efb6c5..39ad4bd7d07503bb7f1e2577c3384c87edd7d49d 100644 (file)
@@ -69,8 +69,9 @@ handle_contract_violation (const std::experimental::contract_violation &violatio
 }
 
 #if _GLIBCXX_INLINE_VERSION
-// Provide symbol without version namespace decoration for gcc.
-extern "C" __attribute__ ((weak)) void
+// The compiler expects the contract_violation class to be in an unversioned
+// namespace, so provide a forwarding function with the expected symbol name.
+extern "C" void
 _Z25handle_contract_violationRKNSt12experimental18contract_violationE
 (const std::experimental::contract_violation &violation)
 { handle_contract_violation(violation); }
This page took 0.05997 seconds and 5 git commands to generate.