This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/4] Add utility macros for clang detection, and deprecation with messages.
- From: Zack Weinberg <zackw at panix dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 22 Jun 2016 07:43:03 -0400
- Subject: Re: [PATCH 3/4] Add utility macros for clang detection, and deprecation with messages.
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463145139 dot git dot zackw at panix dot com> <df18695ba8c89ebf69ab2a91ab13263b1efebc3b dot 1463145139 dot git dot zackw at panix dot com>
On Fri, May 13, 2016 at 9:26 AM, Zack Weinberg <zackw@panix.com> wrote:
> Add three new macros to features.h and sys/cdefs.h:
>
> * __glibc_clang_prereq: just like __GNUC_PREREQ, but for clang.
> * __glibc_clang_has_extension: wraps clang's intrinsic __has_extension.
> Writing "#if defined __clang__ && __has_extension (...)" doesn't work,
> because compilers other than clang will object to the unknown macro
> __has_extension even though they don't need to evaluate it.
> Instead, write "#if __glibc_clang_has_extension (...)".
>
> * __attribute_deprecated_msg__(msg): like __attribute_deprecated__, but
> if possible, prints a message.
Ping?