pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add pg_nodiscard function declaration specifier
Date: Wed, 11 Nov 2020 10:07:11 +0000
Message-ID: <E1kcn1z-0001VT-Oy@gemulon.postgresql.org> (raw)

Add pg_nodiscard function declaration specifier

pg_nodiscard means the compiler should warn if the result of a
function call is ignored.  The name "nodiscard" is chosen in alignment
with (possibly future) C and C++ standards.  It maps to the GCC
attribute warn_unused_result.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/e3753562-99cd-b65f-5aca-687dfd1ec2fc@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c617aea6acdd9057a14d91ff294905b1b5509348

Modified Files
--------------
src/include/c.h | 12 ++++++++++++
1 file changed, 12 insertions(+)



Message-ID: <E1kcn1z-0001VT-Oy@gemulon.postgresql.org>
Permalink:  ../E1kcn1z-0001VT-Oy@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kcn1z-0001VT-Oy@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: peter@eisentraut.org
  Subject: Re: pgsql: Add pg_nodiscard function declaration specifier
  In-Reply-To: <E1kcn1z-0001VT-Oy@gemulon.postgresql.org>
  References: <E1kcn1z-0001VT-Oy@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