Re: pg_attribute_noreturn(), MSVC, C11 - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: pg_attribute_noreturn(), MSVC, C11
Date
Msg-id 871pxj62pq.fsf@wibble.ilmari.org
Whole thread Raw
In response to pg_attribute_noreturn(), MSVC, C11  (Andres Freund <andres@anarazel.de>)
Responses Re: pg_attribute_noreturn(), MSVC, C11
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:

> I suggest we define pg_noreturn as
>
> 1. If C11 is supported, then _Noreturn, else
> 2. If GCC-compatible, then __attribute__((noreturn)), else

Would it be worth also checking __has_attribute(noreturn)?  Or do all
compilers that have __attribute__((noreturn)) claim to be GCC?

> 3. If MSVC, then __declspec((noreturn))

- ilmari



pgsql-hackers by date:

Previous
From: James Hunter
Date:
Subject: Re: Add the ability to limit the amount of memory that can be allocated to backends.
Next
From: Sami Imseih
Date:
Subject: Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)