diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-03-03 12:36:00 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-03-03 17:37:54 +0100 |
commit | a459e6e7984bb3f88f95b587b0cde4a6f8095242 (patch) | |
tree | 41dd0c88738325f83198ca7ebcabab92ea67f3a6 /bridges | |
parent | 09a06141c516991865627f78e39593be856f6457 (diff) |
Avoid loplugin:noexcept
...when building on Linux with Clang -stdlib=libc++,
> In file included from bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:41:
> bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx:156:51: error: Replace legacy dynamic 'throw ()' exception specification with 'noexcept' [loplugin:noexcept]
> extern "C" __cxa_eh_globals * __cxa_get_globals() throw();
> ^~~~~~~
(The situation with respect to these exception specifications is a bit unclear,
recent <https://github.com/itanium-cxx-abi/cxx-abi/blob/main/abi-eh.html>
doesn't mention any exception specifications for those effectively extern "C"
functions, and recent
<https://github.com/llvm/llvm-project/blob/main/libcxxabi/src/cxa_exception.h>
doesn't have an exception specification for __cxa_get_globals and recent
<https://github.com/llvm/llvm-project/blob/main/libcxxabi/include/cxxabi.h>
doesn't have one for __cxa_current_exception_type though it has `throw()` for
__cxa_allocate_exception. On the other hand, recent
<https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/libsupc%2B%2B/cxxabi.h>
and
<https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/libsupc%2B%2B/cxxabi_init_exception.h>
have _GLIBCXX_NOTHROW exception specifications for all three functions, which
expands to `noexcept` for C++11 and beyond.)
Change-Id: I1582c9d3b42977af011d4dc49674fdf12d5ea5ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130926
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx index edcb46d0da2a..d7657bcc04be 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx @@ -153,19 +153,19 @@ struct __cxa_eh_globals { #if !HAVE_CXXABI_H_CXA_GET_GLOBALS namespace __cxxabiv1 { -extern "C" __cxa_eh_globals * __cxa_get_globals() throw(); +extern "C" __cxa_eh_globals * __cxa_get_globals() noexcept; } #endif #if !HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE namespace __cxxabiv1 { -extern "C" std::type_info *__cxa_current_exception_type() throw(); +extern "C" std::type_info *__cxa_current_exception_type() noexcept; } #endif #if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION namespace __cxxabiv1 { -extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw(); +extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) noexcept; } #endif |