This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang
- From: Andreas Schwab <schwab at suse dot de>
- To: Brooks Moses <bmoses at google dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Thu, 20 Nov 2014 09:45:46 +0100
- Subject: Re: [patch] Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang
- Authentication-results: sourceware.org; auth=none
- References: <CAOxa4Kqcbq-X871-kfNt4FDd1ae1ttSHj8fSBGEY3QqzcfaBCA at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1308291215460 dot 32214 at digraph dot polyomino dot org dot uk> <CAOxa4KrUzE8dViqoPoeCE9iwjGxF+xkc5RSp-ZoDbCUK+sU+Jg at mail dot gmail dot com>
Brooks Moses <bmoses@google.com> writes:
> Thus, I'd like to go with Andrew Pinski's idea of using a
> "__cplusplus>=199711L" check, and use the legacy behavior (check for
> GCC of 4.4 or later) otherwise. As I explain in the code comment,
> this basically assumes that C++ compilers that claim to fully support
> C++98 are using a standard-conforming C++ standard library, which
> seems pretty reasonable.
But C++98 doesn't require support for __asm.
# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
extern "C++" void *rawmemchr (void *__s, int __c)
__THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1));
extern "C++" const void *rawmemchr (const void *__s, int __c)
__THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1));
# else
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."