__attribute__((noreturn)) conflicts with stdnoreturn.h
If <stdnoreturn.h> is included first, then noreturn is defined to
_Noreturn, and then __attribute__((noreturn)) will end up being
__attribute__((_Noreturn)), which would not be recognized and might
result in a compiler warning. To avoid this, use the alternative
spelling __attribute__((__noreturn__)) instead. This is supported by
the same compiler versions.
But I don't know if there is an equivalent workaround for __declspec(noreturn). An alternative might be to do #define TCL_NORETURN _Noreturn if the compiler is in C11 mode.
4dccf56126Fix [04aad56155]: __attribute__((noreturn)) conflicts with stdnoreturn.h check-in2025-04-07 09:37:295e08166b8cFix [04aad56155]: __attribute__((noreturn)) conflicts with stdnoreturn.h check-in2025-04-07 09:21:48
Thanks for the report. Fixed [here]
Since <stdnoreturn.h> has issues on various platforms, and _Noreturn is already deprecated in C23, I recommend not to use `<stdnoreturn.h>`. But since the double-underscored variants give less chance to problems, your suggestion is better than doing nothing.
See: https://www.gnu.org/software/gnulib/manual/html_node/stdnoreturn_002eh.html
Thanks!