Re: Windows build warnings - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: Windows build warnings
Date
Msg-id 877dcxpoc6.fsf@wibble.ilmari.org
Whole thread Raw
In response to Re: Windows build warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari@ilmari.org> writes:
>> Should we change the compiler checks for attributes in c.h to include
>> `|| __has_attribute(…)`, so that we automatically get them on compilers
>> that support that (particularly clang)?
>
> clang already #defines GCC, no?


__GNUC__, but yes, I didn't realise that.  Clang 11 seems to claim to be
GCC 4.2 by default, but that can be overridden usng the -fgnuc-version
(and turned off by setting it to zero).

Do any other compilers support __has_attribute()?

>             regards, tom lane

- ilmari



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Rename dead_tuples to dead_items in vacuumlazy.c
Next
From: Bharath Rupireddy
Date:
Subject: Re: pg_replslotdata - a tool for displaying replication slot information