File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,14 @@ extern "C" {
4141
4242/* C23 has a [[noreturn]] attribute supported in GCC 13 and LLVM clang
4343 * 15 with -std=c2x but not Apple clang 14. All have version 202000L.
44+ * clang 19 has version 202301L
45+ * gcc pre-15 supports -std=gnu23 with version 202301L but does not
46+ * support (and barfs on) this attribute, so restrict to clang for now.
47+ *
4448 * In C11 there is _Noreturn * (or noreturn in header <stdnoreturn.h>).
4549 */
4650#if defined NORET
47- #elif (defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 202301L )
51+ #elif (defined(__clang__ ) && defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 202301L )
4852# define NORET [[noreturn]]
4953#elif defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 201102L
5054# define NORET _Noreturn
You can’t perform that action at this time.
0 commit comments