Re: pg_attribute_noreturn(), MSVC, C11

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(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-06 14:52:15
Message-ID: 7706a9fb-8f54-4e0b-988d-085956d4a959@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03.01.25 21:51, Dagfinn Ilmari Mannsåker wrote:
> 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?

I don't think that would expand the set of supported compilers in a
significant way. We can always add it if we find one, of course.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2025-01-06 15:42:16 Re: Adjusting hash join memory limit to handle batch explosion
Previous Message Tom Lane 2025-01-06 14:49:22 Re: Fwd: Re: A new look at old NFS readdir() problems?