From fcad8200ea5238106c89b7f120889be8d419220c Mon Sep 17 00:00:00 2001 From: zrj Date: Wed, 2 May 2018 16:32:23 +0300 Subject: [PATCH 1/1] gcc80: Remove throw() from protos in libstdc++ headers. The throw() as dynamic exception specificators was deprecated in c++11 and removed in c++17 (empty was made as an alias to noexcept(true)). Our libc headers does not have the __attribute__(__nothrow__) markups. To make libstdc++ fully usable for clangs on DragonFly it makes sense to just remove the throw() additions in c++ language binding headers. Previously in gcc50 we were excluding them just for __clang__ case as in: 838772be3c028f0cfd9fae5da181858e4199863a --- .../libstdc++-v3/include/c_global/cstdio | 8 +++----- .../libstdc++-v3/include/c_global/cstdlib | 18 +++++++++--------- .../libstdc++-v3/include/c_global/cwchar | 6 +++--- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdio b/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdio index f9472d7ca4..da936af790 100644 --- a/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdio +++ b/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdio @@ -158,17 +158,15 @@ namespace __gnu_cxx { #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" int - (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...) - throw (); + (snprintf)(char * __restrict, std::size_t, const char * __restrict, ...); extern "C" int (vfscanf)(FILE * __restrict, const char * __restrict, __gnuc_va_list); extern "C" int (vscanf)(const char * __restrict, __gnuc_va_list); extern "C" int (vsnprintf)(char * __restrict, std::size_t, const char * __restrict, - __gnuc_va_list) throw (); + __gnuc_va_list); extern "C" int - (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list) - throw (); + (vsscanf)(const char * __restrict, const char * __restrict, __gnuc_va_list); #endif #if !_GLIBCXX_USE_C99_DYNAMIC diff --git a/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdlib b/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdlib index 10335017f0..9c89d0d0de 100644 --- a/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdlib +++ b/contrib/gcc-8.0/libstdc++-v3/include/c_global/cstdlib @@ -54,15 +54,15 @@ namespace std { - extern "C" void abort(void) throw () _GLIBCXX_NORETURN; - extern "C" int atexit(void (*)(void)) throw (); - extern "C" void exit(int) throw () _GLIBCXX_NORETURN; + extern "C" void abort(void) _GLIBCXX_NORETURN; + extern "C" int atexit(void (*)(void)); + extern "C" void exit(int) _GLIBCXX_NORETURN; #if __cplusplus >= 201103L # ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT - extern "C" int at_quick_exit(void (*)(void)) throw (); + extern "C" int at_quick_exit(void (*)(void)); # endif # ifdef _GLIBCXX_HAVE_QUICK_EXIT - extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN; + extern "C" void quick_exit(int) _GLIBCXX_NORETURN; # endif #endif } // namespace std @@ -200,7 +200,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using ::lldiv_t; #endif #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC - extern "C" void (_Exit)(int) throw () _GLIBCXX_NORETURN; + extern "C" void (_Exit)(int) _GLIBCXX_NORETURN; #endif #if !_GLIBCXX_USE_C99_DYNAMIC using ::_Exit; @@ -217,11 +217,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC - extern "C" long long int (atoll)(const char *) throw (); + extern "C" long long int (atoll)(const char *); extern "C" long long int - (strtoll)(const char * __restrict, char ** __restrict, int) throw (); + (strtoll)(const char * __restrict, char ** __restrict, int); extern "C" unsigned long long int - (strtoull)(const char * __restrict, char ** __restrict, int) throw (); + (strtoull)(const char * __restrict, char ** __restrict, int); #endif #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::atoll; diff --git a/contrib/gcc-8.0/libstdc++-v3/include/c_global/cwchar b/contrib/gcc-8.0/libstdc++-v3/include/c_global/cwchar index 475322ee80..d7ec31e80d 100644 --- a/contrib/gcc-8.0/libstdc++-v3/include/c_global/cwchar +++ b/contrib/gcc-8.0/libstdc++-v3/include/c_global/cwchar @@ -242,16 +242,16 @@ namespace __gnu_cxx { #if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC extern "C" long double - (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict) throw (); + (wcstold)(const wchar_t * __restrict, wchar_t ** __restrict); #endif #if !_GLIBCXX_USE_C99_DYNAMIC using ::wcstold; #endif #if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC extern "C" long long int - (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); + (wcstoll)(const wchar_t * __restrict, wchar_t ** __restrict, int); extern "C" unsigned long long int - (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int) throw (); + (wcstoull)(const wchar_t * __restrict, wchar_t ** __restrict, int); #endif #if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC using ::wcstoll; -- 2.41.0