summaryrefslogtreecommitdiff
path: root/lib/wchar.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-04-14 00:52:26 +0200
committerBruno Haible <bruno@clisp.org>2022-04-14 00:52:26 +0200
commitf358d8ddab84e94e63a2c21e7d47290bdfc3f2a8 (patch)
tree8c3bc14f07ba935e71509aa9cf18eb2613f54066 /lib/wchar.in.h
parent0b3f5d1b4c0b13bb51b4b6aa63392aa5231da3fc (diff)
downloadgnulib-f358d8ddab84e94e63a2c21e7d47290bdfc3f2a8.tar.gz
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.
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r--lib/wchar.in.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index d7792e5fb7..0d5c0b7abe 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -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