[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix incomplete declaration for C23
From: |
Georg Sauthoff |
Subject: |
Re: [PATCH] fix incomplete declaration for C23 |
Date: |
Sun, 26 Jan 2025 16:32:10 +0100 |
Hello,
On Sun, Jan 26, 2025 at 01:07:59AM +0000, Tim Rice wrote:
> > Just to add some more context, ftr, without that change datamash
> > compilation runs into a compile error on C23 compilers because C23
> > basically made `T foo()` equivalent to `T foo(void)`.
>
> Yep, I believe that's what the commit message now says. Did I make mistakes?
I hadn't checked your commit message.
After revisiting the thread I just thought providing some additional context
directly in this mailing list thread might be useful to the casual reader - or
even myself in case I come across it after several months or so.
> > This broke the build on current Fedora Rawhide, recently, since the GCC
> > version available there already defaults to compiling to C23 (or to
> > C23+GNU extensions or so).
> Thanks for the extra context. I'm on gentoo and saw no problems here until I
> explicitly set std.
> $ gcc -v
[..]
> gcc version 14.2.1 20241221 (Gentoo 14.2.1_p20241221 p7) ```
> Is it a GCC version thing, or is it a distro configuration thing?
It's the former.
Fedora Rawhide already is on GCC 15:
```
$ rpm -q gcc
gcc-15.0.1-0.3.fc42.1.x86_64
$ man gcc 2>/dev/null | grep ' gnu23' -A3
gnu23
gnu2x
GNU dialect of ISO C23. This is the default for C code. The
name gnu2x is deprecated.
$ gcc -dM -E -x c /dev/null | grep STDC_V
#define __STDC_VERSION__ 202311L
```
Best regards,
Georg
--
'Only bad boys use such recursive calls, but only good girls use
this package. Thus the problem is of minor interest.'
(Listings user guide)