This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Ping^4 Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang.
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: Brooks Moses <bmoses at google dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 23 Dec 2013 18:43:49 +0000
- Subject: Re: [PATCH] Ping^4 Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang.
- Authentication-results: sourceware.org; auth=none
- References: <CAOxa4KoXaQPUSZuniRVhUfcDpaW+pxM5JZ4qtHBjdRu4Lgjzxw at mail dot gmail dot com> <20131223170646 dot GB5291 at domone>
On Mon, 23 Dec 2013, Ondrej Bilka wrote:
> Joseph, are you ok with this? This is simple addition that could go to 2.19,
> is Brooks rationale sufficient for you?
I'm happy with the principle, given that this doesn't affect the set of
GCC versions for which this applies. I believe we have a rule that
warning-avoidance in installed glibc headers should not depend on warnings
being disabled in system headers that would not be disabled elsewhere -
thus, to be clear with -Wundef -Wsystem-headers, the #if condition needs
to be of the form defined __cplusplus && (__cplusplus >= 199711L ||
__GNUC_PREREQ (4, 4)) (generally, #if conditions in system headers need to
avoid using the value of a possibly undefined macro). And we did
previously (Dec 2012 / Jan 2013) discuss a principle of putting compiler
feature tests in features.h or sys/cdefs.h and avoiding them in other
installed headers - but haven't really done anything much to implement
such a principle. (It's also less clear such a principle would actually
be helpful in some cases of optimizations in headers.)
--
Joseph S. Myers
joseph@codesourcery.com