]> Savannah Git Hosting - gnulib.git/commitdiff
string, wchar: Fix error in C++ mode on glibc systems with clang.
authorBruno Haible <bruno@clisp.org>
Wed, 13 Apr 2022 22:52:26 +0000 (00:52 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 31 Aug 2022 22:58:25 +0000 (00:58 +0200)
* lib/string.in.h (free): Add exception specification like glibc does.
* lib/wchar.in.h (free): Likewise.

ChangeLog
lib/string.in.h
lib/wchar.in.h

index f6bfd4bee42e3bd0bd9e62ce7e4aba94f5c2a1b7..bcde49cde3979e38aa9e5879c2ee738f69ecdfca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-04-13  Bruno Haible  <bruno@clisp.org>
+
+       string, wchar: Fix error in C++ mode on glibc systems with clang.
+       * lib/string.in.h (free): Add exception specification like glibc does.
+       * lib/wchar.in.h (free): Likewise.
+
 2022-04-13  Bruno Haible  <bruno@clisp.org>
 
        string: Fix errors in C++ mode on glibc systems with clang.
index b818ae9cdfac6a7a8c57eddd6aff19fbb0b0132b..b6840fa9121a7c93110039e7f912cd681c953778 100644 (file)
@@ -125,14 +125,22 @@ _GL_EXTERN_C void rpl_free (void *);
 #  if defined _MSC_VER
 _GL_EXTERN_C void __cdecl free (void *);
 #  else
+#   if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void free (void *) throw ();
+#   else
 _GL_EXTERN_C void free (void *);
+#   endif
 #  endif
 # endif
 #else
 # if defined _MSC_VER
 _GL_EXTERN_C void __cdecl free (void *);
 # else
+#  if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void free (void *) throw ();
+#  else
 _GL_EXTERN_C void free (void *);
+#  endif
 # endif
 #endif
 
index d7792e5fb7ad21ebbc16969679a721d1a096cf41..0d5c0b7abe7c519de8aa8246d74a881a8fed693a 100644 (file)
@@ -188,14 +188,22 @@ _GL_EXTERN_C void rpl_free (void *);
 #  if defined _MSC_VER
 _GL_EXTERN_C void __cdecl free (void *);
 #  else
+#   if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void free (void *) throw ();
+#   else
 _GL_EXTERN_C void free (void *);
+#   endif
 #  endif
 # endif
 #else
 # if defined _MSC_VER
 _GL_EXTERN_C void __cdecl free (void *);
 # else
+#  if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void free (void *) throw ();
+#  else
 _GL_EXTERN_C void free (void *);
+#  endif
 # endif
 #endif