On 10/22/18 8:42 AM, Akim Demaille wrote:
This is coming from gnulib.  Could you submit your patch there?
I don’t know how they handle _Noreturn.

In Gnulib, _Noreturn is for function declarations and definitions, whereas __attribute_noreturn__ is for pointed-to functions (i.e., for function types that are targets of pointers). The distinction is needed partly because _Noreturn is a C11-ism and should be portable to any C11 compiler, whereas __attribute_noreturn__ is a GCC-ism and should work with both non-C11 and C11 GCCs.

So from the Gnulib point of view, the patch

-static _Noreturn void
+static __attribute_noreturn__ void
 print_and_abort (void)

seems like it's heading in the wrong direction. However, I don't fully grok the original bug report so it's possible I'm missing something. Was the compiler in question GCC, or something else? What version and platform?


Reply via email to