Re: pgsql: Add noreturn attributes to some error reporting functions

Lists: pgsql-committerspgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add noreturn attributes to some error reporting functions
Date: 2013-02-12 12:14:06
Message-ID: E1U5EkQ-0006XF-UV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Add noreturn attributes to some error reporting functions

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0cb1fac3b19f01025b63d2cdceabb8767185da28

Modified Files
--------------
contrib/cube/cubescan.l | 2 +-
contrib/seg/segscan.l | 2 +-
src/backend/replication/repl_scanner.l | 2 +-
src/include/mb/pg_wchar.h | 4 ++--
src/include/parser/parse_relation.h | 4 ++--
src/include/storage/lock.h | 2 +-
src/include/tcop/tcopprot.h | 2 +-
src/pl/plpgsql/src/pl_scanner.c | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)


From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add noreturn attributes to some error reporting functions
Date: 2013-02-12 12:19:01
Message-ID: 20130212121901.GA12852@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 2013-02-12 12:14:06 +0000, Peter Eisentraut wrote:
> Add noreturn attributes to some error reporting functions

I wonder if its time to add a macro for this instead of slapping
__attribute__((noreturn)) everywhere. That way msvc had a chance of
adding __declspec(noreturn) or whatever its magic incatation is
transparently. And perhaps other compilers in the future.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add noreturn attributes to some error reporting functions
Date: 2013-02-13 16:08:56
Message-ID: 511BBA98.8030004@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 2/12/13 7:19 AM, Andres Freund wrote:
> On 2013-02-12 12:14:06 +0000, Peter Eisentraut wrote:
>> Add noreturn attributes to some error reporting functions
>
> I wonder if its time to add a macro for this instead of slapping
> __attribute__((noreturn)) everywhere. That way msvc had a chance of
> adding __declspec(noreturn) or whatever its magic incatation is
> transparently. And perhaps other compilers in the future.

Sure, if someone who has access to both msvc and gcc wanted to put in
the leg work, it would be worth a try.

One possible problem is whether the placement of these modifiers is the
same across all potential compilers. But we currently use these in
enough places that it would be easy to find that out by just converting
everything and building it.