pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Rely on inline functions even if that causes warnings in older c
Date: Wed, 05 Aug 2015 16:25:35 +0000
Message-ID: <E1ZN1VX-00060t-8g@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Rely on inline functions even if that causes warnings in older compilers.

So far we have worked around the fact that some very old compilers do
not support 'inline' functions by only using inline functions
conditionally (or not at all). Since such compilers are very rare by
now, we have decided to rely on inline functions from 9.6 onwards.

To avoid breaking these old compilers inline is defined away when not
supported. That'll cause "function x defined but not used" type of
warnings, but since nobody develops on such compilers anymore that's
ok.

This change in policy will allow us to more easily employ inline
functions.

I chose to remove code previously conditional on PG_USE_INLINE as it
seemed confusing to have code dependent on a define that's always
defined.

Blacklisting of compilers, like in c53f73879f, now has to be done
differently. A platform template can define PG_FORCE_DISABLE_INLINE to
force inline to be defined empty.

Discussion: 20150701161447.GB30708@awork2.anarazel.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/de6fd1c898f6eca82c2130a9dbb42d00da68d79e

Modified Files
--------------
config/c-compiler.m4                      |   34 ---------
config/test_quiet_include.h               |   18 -----
configure                                 |   38 -----------
configure.in                              |    2 +-
src/backend/lib/ilist.c                   |    3 -
src/backend/nodes/list.c                  |    3 -
src/backend/port/atomics.c                |    7 --
src/backend/utils/adt/arrayfuncs.c        |    3 -
src/backend/utils/mmgr/mcxt.c             |    3 -
src/backend/utils/sort/sortsupport.c      |    3 -
src/include/access/gin_private.h          |    8 +--
src/include/c.h                           |   42 ++++--------
src/include/lib/ilist.h                   |  106 ++++++++---------------------
src/include/nodes/pg_list.h               |   17 ++---
src/include/pg_config.h.in                |    4 --
src/include/pg_config.h.win32             |    6 +-
src/include/port/atomics.h                |  101 +++++++--------------------
src/include/port/atomics/arch-x86.h       |    4 --
src/include/port/atomics/fallback.h       |    5 --
src/include/port/atomics/generic-acc.h    |   12 +---
src/include/port/atomics/generic-gcc.h    |    8 +--
src/include/port/atomics/generic-msvc.h   |    8 ---
src/include/port/atomics/generic-sunpro.h |    4 --
src/include/port/atomics/generic-xlc.h    |    8 ---
src/include/port/atomics/generic.h        |    4 --
src/include/utils/arrayaccess.h           |   19 +-----
src/include/utils/palloc.h                |   11 +--
src/include/utils/sortsupport.h           |   18 +----
src/template/aix                          |    8 +++
29 files changed, 92 insertions(+), 415 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1ZN1VX-00060t-8g@gemulon.postgresql.org>
Permalink:  ../E1ZN1VX-00060t-8g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ZN1VX-00060t-8g@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: andres@anarazel.de
  Subject: Re: pgsql: Rely on inline functions even if that causes warnings in older c
  In-Reply-To: <E1ZN1VX-00060t-8g@gemulon.postgresql.org>
  References: <E1ZN1VX-00060t-8g@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