This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [2.24 PATCH 1/3] Add utility macros for clang detection, and deprecation with messages.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]