Subject: bug#78903: [PATCH] ISO C99 does not support _Noreturn

From: Paul Eggert <[email-masked]>
Date: Thu, 26 Jun 2025 11:43:24 -0700

On 2025-06-26 01:08, Helmut Eller wrote:
> On Thu, Jun 26 2025, Eli Zaretskii wrote:
> 
>>> From: Helmut Eller<[email-masked]>
>>> Date: Thu, 26 Jun 2025 09:20:51 +0200
>>>
>>> When I use gcc 14 with -std=gnu99 -Wpedantic I get lots of warnings of
>>> the form
>>>
>>>   warning: ISO C99 does not support ‘_Noreturn’ [-Wpedantic].
>> Why did you use -Wpedantic?
> To get warnings when I use a non-C99 feature.

To do that, you can run something like this:

   ./configure CFLAGS='-std=c99 -Wpedantic'
   make

You'll still see many warnings, though none about _Noreturn.

'-std=gnu99' says "it's OK to use GNU extensions" and so is not the best 
choice to test for C99 conformance. '-std=c99' is better (though still 
not perfect of course). Running 'configure' as shown above should avoid 
the _Noreturn warnings you mentioned.

Alternatively, you can compile with -D_Noreturn='__attribute__ 
((__noreturn__))'.

Not sure it's worth changing Gnulib to support what appears to be a GCC 
option clash. I suppose I could ask on bug-gnulib.