This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [2.24 PATCH 1/3] Add utility macros for clang detection, and deprecation with messages.
- From: Zack Weinberg <zackw at panix dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Mike Frysinger <vapier at gentoo dot org>, "Carlos O'Donell" <carlos at redhat dot com>
- Date: Mon, 1 Aug 2016 10:20:30 -0400
- Subject: Re: [2.24 PATCH 1/3] Add utility macros for clang detection, and deprecation with messages.
- Authentication-results: sourceware.org; auth=none
- References: <cover.1469994984.git.zackw@panix.com> <096b80f58b0361a9b34b2eb92e370b0592d15971.1469994984.git.zackw@panix.com> <83976c8f-ecd6-f24b-1c12-70c59d04dae5@cs.ucla.edu>
On Sun, Jul 31, 2016 at 11:29 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> Zack Weinberg wrote:
>>
>> +#if __GNUC_PREREQ (4,5) || \
>> + __glibc_clang_has_extension (__attribute_deprecated_with_message__)
>
> This sort of condition should be reworded to be simpler, like this:
[...]
Roland asked for something similar when we were discussing an earlier
revision. I've thought about it a bunch and I have concluded that it
does not actually make _this particular situation_ any simpler. Right
now, there's only one conditional, controlling how
__attribute_deprecated_with_message__ is defined. If I were to
introduce the mechanism you want, we would have _two_ conditionals
involved in the definition of that macro.
It might still be a good idea as part of a complete revision of
sys/cdefs.h + features.h, subsuming _all_ of the GCC version checks
into this mechanism and rendering it easily extensible to more
different compilers -- which is what Roland wanted -- but that is a
separate project, not appropriate for 2.24 at this stage, and I do not
want to mission-creep _this_ patchset even to the extent of
introducing the skeleton of the mechanism.
zw