Re: pg_attribute_noreturn(), MSVC, C11

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: pg_attribute_noreturn(), MSVC, C11
Date: 2025-01-03 20:51:13
Message-ID: 871pxj62pq.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-01-03 21:09:18 Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)
Previous Message James Hunter 2025-01-03 20:15:07 Re: Add the ability to limit the amount of memory that can be allocated to backends.