This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17631] Implementation of __CORRECT_ISO_CPP_STRING_H_PROTO relies on GCC extensions
- From: "richard at metafoo dot co.uk" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 11 Feb 2016 19:41:07 +0000
- Subject: [Bug libc/17631] Implementation of __CORRECT_ISO_CPP_STRING_H_PROTO relies on GCC extensions
- Auto-submitted: auto-generated
- References: <bug-17631-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17631
Richard Smith <richard at metafoo dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |richard at metafoo dot co.uk
Resolution|FIXED |---
--- Comment #4 from Richard Smith <richard at metafoo dot co.uk> ---
This change regresses glibc's support for Clang, and means that glibc no longer
provides correct prototypes for <string.h> and <wchar.h> functions for C++ for
any compiler other than GCC. There's no way for a C++ standard library to work
around it (without relying on compiler extensions).
If __asm is not available, the same result can be achieved by defining the C++
signatures of (eg) memchr in terms of the C signature:
__extern_always_inline void *
__call_memchr(const void *__s, int __c, size_t __n) __THROW
{
extern void *memchr(const void *, int, size_t);
return memchr(__s, __c, __n);
}
extern "C++" inline void *
memchr(void *__s, int __c, size_t __n) __THROW
{
__call_memchr(__s, __c, __n);
}
extern "C++" inline const void *
memchr(const void *__s, int __c, size_t __n) __THROW
{
__call_memchr(__s, __c, __n);
}
--
You are receiving this mail because:
You are on the CC list for the bug.