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: [PATCH 1/2] Add __clang_has_extension to sys/cdefs.h.


On 04/25/2016 03:57 PM, Zack Weinberg wrote:

Experimenting, clang treats __has_extension as an intrinsic *macro* --
for instance, #ifdef __has_extension is true.  So maybe we could just do

#ifndef __has_extension
#define __has_extension(...) 0
#endif

and that would be good enough?

This will confuse application that checks for the presence of __has_extension. glibc should not provide compiler-defined macros coming from non-GNU compilers because it will be difficult to coordinate with these parties (it's sometimes even difficult with GCC).

Florian


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