bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#78903: [PATCH] ISO C99 does not support _Noreturn
Date: Thu, 26 Jun 2025 12:13:39 +0300

> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: eggert@cs.ucla.edu,  78903@debbugs.gnu.org
> Date: Thu, 26 Jun 2025 10:40:47 +0200
> 
> On Thu, Jun 26 2025, Eli Zaretskii wrote:
> 
> >> From: Helmut Eller <eller.helmut@gmail.com>
> >> Cc: Paul Eggert <eggert@cs.ucla.edu>,  78903@debbugs.gnu.org
> >> Date: Thu, 26 Jun 2025 10:08:54 +0200
> >> 
> >> On Thu, Jun 26 2025, Eli Zaretskii wrote:
> >> 
> >> >> From: Helmut Eller <eller.helmut@gmail.com>
> >> >> 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.  Emacs' C code should be
> >> written in C99.  It would be easier to follow that rule it were checked
> >> automatically.
> >
> > AFAIK, Emacs is written in C99 with extensions.
> 
> It would still be easier if the somewhat arbitrary set of extensions
> would be checked automatically.
> 
> > Can you tell why the definition of _Noreturn in src/config.in doesn't
> > work for you?  AFAIU, it exactly defines _Noreturn to use
> > __attribute__ ((__noreturn__)), but I'm probably missing something.
> 
> Without the patch, the case with the comment /* _Noreturn works as-is.
> */ is used.  That causes the warnings.
> 
> > is the problem that you use clang, and config.in currently doesn't
> > cater to that?
> 
> No. I don't use clang.
> 
> > If so, the change should be in config.in, I think.
> 
> I don't think so, because config.in is generated by autogen.sh.

OK, let's see what Paul thinks about this.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]