Re: make pg_attribute_noreturn() work for msvc? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: make pg_attribute_noreturn() work for msvc?
Date
Msg-id 28353.1573592287@sss.pgh.pa.us
Whole thread Raw
In response to make pg_attribute_noreturn() work for msvc?  (Andres Freund <andres@anarazel.de>)
Responses Re: make pg_attribute_noreturn() work for msvc?
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> So perhaps we ought to rename pg_attribute_noreturn() to pg_noreturn(),
> add a __declspec(noreturn) version, and move the existing uses to it.

> I'm inclined to also drop the parentheses at the same time (i.e
> pg_noreturn rather than pg_noreturn()) - it seems easier to mentally
> parse the code that way.

I guess my big question about that is whether pgindent will make a
hash of it.

One idea is to merge it with the "void" result type that such
a function would presumably have, along the lines of

#define pg_noreturn    void __declspec(noreturn)
...
extern pg_noreturn proc_exit(int);

and if necessary, we could strongarm pgindent into believing
that pg_noreturn is a typedef.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: PHJ file leak.
Next
From: Thomas Munro
Date:
Subject: Re: Collation versioning