Skip to content

Commit

Permalink
src/flint.h.in: fix "noreturn" attribute in C23 mode
Browse files Browse the repository at this point in the history
C23 uses [[noreturn]] for this, just like C++.

Signed-off-by: Michael Orlitzky <[email protected]>
  • Loading branch information
orlitzky committed Nov 26, 2024
1 parent cb7513b commit ee51683
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/flint.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ typedef const ulong * nn_srcptr;
# define FLINT_DEPRECATED
#endif

#if defined(__cplusplus)
#if defined(__cplusplus) || ( __STDC_VERSION__ >= 202300L )
# define FLINT_NORETURN [[noreturn]]
#elif __STDC_VERSION__ < 202300L
# define FLINT_NORETURN _Noreturn
#else
# define FLINT_NORETURN noreturn
# define FLINT_NORETURN _Noreturn
#endif

#if FLINT_USES_TLS
Expand Down

0 comments on commit ee51683

Please sign in to comment.