pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix unportable usage of __has_attribute
Date: Tue, 24 Nov 2020 00:10:17 +0000
Message-ID: <E1khLuT-0006Ze-3s@gemulon.postgresql.org> (raw)

Fix unportable usage of __has_attribute

This should fix the breakages caused by 697e1d02f, which seems to break
the build for GCC version < 5.

It seems, according to the GCC manual that __has_attribute is a "special
operator" and must be tested without any other conditions in the
preprocessor test.

Per recommendation from the GCC manual via Greg Nancarrow

Reported-by: Greg Nancarrow
Discussion: https://postgr.es/m/CAJcOf-euSu8fhC10v476o9dqnjqKysVs1_vRms-_fvajpZ3kFw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1fa22a43a56e1fe44c7bb3a3d5ef31be5bcac41d

Modified Files
--------------
src/include/c.h | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



Message-ID: <E1khLuT-0006Ze-3s@gemulon.postgresql.org>
Permalink:  ../E1khLuT-0006Ze-3s@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1khLuT-0006Ze-3s@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Fix unportable usage of __has_attribute
  In-Reply-To: <E1khLuT-0006Ze-3s@gemulon.postgresql.org>
  References: <E1khLuT-0006Ze-3s@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox