Re: pg_attribute_noreturn(), MSVC, C11
Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org,
Thomas Munro <thomas.munro@gmail.com>
Date: 2025-01-03T20:51:13Z
Lists: 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
Commits
-
Use standard C23 and C++ attributes if available
- 76f4b92bac87 19 (unreleased) landed
-
Swap order of extern/static and pg_nodiscard
- 05cbd6cb22d2 18.0 landed
-
pg_noreturn to replace pg_attribute_noreturn()
- 3691edfab971 18.0 landed