Hey folks,
The discussion around the CY2024 draft triggered a thought from me
that we should probably have the C standard revision specified just
like we do for C++.
There are a couple of reasons for why we should do this:
1. The C standard *does change*, especially in potentially incompatible ways
2. C compilers are looking to tighten conformance and update default standards
Today, most compilers default to C99, but there's an effort going on
to update the default standard for compilers to the next one (C23) and
the C23 standard will attempt to try to improve interoperability of
mixed C and C++ code by bringing in keywords, capabilities, and
structures from C++23 to C23 where it makes sense.
Within the Linux distribution space, there's an effort to update C
codebases to work with the newer C standard in preparation for this
switch by compilers coming up soon.
In particular, GCC 14 will be updating the default behaviors for C
code compilation to align more with C23:
https://fedoraproject.org/wiki/Changes/PortingToModernC
To that end, I expect that we're going to see compilers refresh their
default behaviors more frequently to conform with the latest standards
in C like they do with C++ today.
For the VFX platform, this means you can no longer implicitly rely on
your compiler using the same C standard behavior it always has used.
You need to specify it, just like you do for C++ code.
I would like to request that all previous standards retroactively have
C99 marked, and we start thinking about C18 for a future update along
with the refresh to C++20.
This would align with the largest Qt 6-based project (KDE). Note that
Qt 6 *requires* at least C++17 compatibility (which I expect is fine
by most folks now), but KDE Frameworks 6 requires C++20 (as a note for
anyone using KDE Frameworks in their projects/products/etc.).
For now, there's no need to change anything, I would just like us to
have the C standard specified alongside the C++ one. In the future, we
should consider C standard upgrades alongside C++ standard upgrades.
Thanks in advance and best regards,
Neal
--
真実はいつも一つ!/ Always, there's only one truth!