From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: make pg_attribute_noreturn() work for msvc? |
Date: | 2019-11-12 20:58:07 |
Message-ID: | 28353.1573592287@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Mukesh Chhatani | 2019-11-12 21:01:28 | Re: BUG #16109: Postgres planning time is high across version - 10.6 vs 10.10 |
Previous Message | Andres Freund | 2019-11-12 20:55:06 | Re: BUG #16109: Postgres planning time is high across version - 10.6 vs 10.10 |