Skip to content

Commit

Permalink
Fix definitions of FLINT_NORETURN and FLINT_TLS_PREFIX for C++
Browse files Browse the repository at this point in the history
  • Loading branch information
albinahlback committed Nov 18, 2023
1 parent 453dc21 commit 7d088dd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/flint.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,22 @@ typedef struct __FLINT_FILE FLINT_FILE;
# define FLINT_OPTIMIZE(x)
#endif

#if __STDC_VERSION__ < 201112L
#ifdef __cplusplus
# define FLINT_C_VERSION __cplusplus
#else
# define FLINT_C_VERSION __STDC_VERSION__
#endif

#if FLINT_C_VERSION < 201112L
# error FLINT requires C11 or newer.
#elif __STDC_VERSION__ < 202300L
#elif FLINT_C_VERSION < 202300L
# define FLINT_NORETURN _Noreturn
#else
# define FLINT_NORETURN noreturn
#endif

#if FLINT_USES_TLS
# if __STDC_VERSION__ < 202300L
# if FLINT_C_VERSION < 202300L
# define FLINT_TLS_PREFIX _Thread_local
# else
# define FLINT_TLS_PREFIX thread_local
Expand Down

0 comments on commit 7d088dd

Please sign in to comment.