GNU bug report logs -
#78903
[PATCH] ISO C99 does not support _Noreturn
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Thu, 26 Jun 2025 07:22:01 UTC
Severity: normal
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #35 received at 78903 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jun 28 2025, Paul Eggert wrote:
> On 2025-06-27 07:05, Helmut Eller wrote:
>> The combination -Og -std=gnu99 -Wpedantic is
>> usable; -Og -std=cc99 -Wpedantic produces fewer warnings though. With
>> -O0, both -std=gnu99 and -std=c99 produce too many warnings about
>> statement expressions to be of any use.
>
> You can suppress those statement-expression warnings by configuring
> this way:
>
> ./configure \
> CFLAGS='-O0 -std=c99 -Wpedantic' \
> emacs_cv_statement_expressions=no
That's useful. I didn't know about this. Thanks.
> I did that, and the resulting build generated several warnings about
> converting between function and data pointers that don't matter on any
> practical platform that I know of. I'm not sure it's worth the hassle
> to pacify GCC about them.
Probably not; there aren't that many. It's an odd warning that deserves
the name "pedantic."
> I did find a few other C99 violations, though, and fixed them by
> installing the attached patch.
Thanks.
> Is it still important that Emacs port to C99? Perhaps we should
> upgrade the build requirement to C11 or later. It has been 14 years
> since C11, after all....
Not my decision to make. Some lightweight compilers like Tiny CC or PCC
apparently only support C99. Not sure how relevant those are, though.
>> I would place the 201112 <= STDC_VERSION test first and only if it fails
>> fall back to __attribute__((__return__)).
>
> Thanks for checking. I made the changes you suggested to Gnulib, and
> updated Emacs master from Gnulib. Please give it a try.
Oh. That must have been a lot of work. Thanks again.
Helmut
This bug report was last modified 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.