This is the mail archive of the 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 06/13] Installed header hygiene (BZ#20366): Macros used in #if without checking whether they are defined.

On Wed, Sep 21, 2016 at 2:02 PM, Carlos O'Donell <> wrote:
>>         * misc/sys/cdefs.h: Tidy up conditional nest defining __flexarr.
>>         Define __flexarr_is_fake when the compiler does not support
>>         flexible array members.
> This patch fails to follow the Macro API best practice that all macros
> be defined and that we should check for their values not their defined-ness
> which can introduce subtle errors e.g. __flexarr_is_fake.

Doh, I should have remembered that.  I think I'll also flip the sense
and call it __glibc_c99_flexarr_available.  It's a bit of a mouthful
but it makes for a clearer test at the point of use.

> At a high level I would expect _LIBC to always be defined as either 0 or 1.

My expectation is actually that it is either undefined or 1, for
historical reasons, but I wouldn't want to swear that it never gets
defined to be 0.


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