ejolson wrote: ↑Wed Jan 25, 2023 11:01 pm
Is there any indication when C23 might be the default language level in gcc?
If history is any guide, the default for gcc might become g23 -- the C23 standard, or close to it, with gcc-specific extensions.
For a very long time, the default was g99, which implemented their support of C99 with gcc extensions. The standard is very close to full support with -std=g99 and -std=c99, but not 100% -- somewhere on gcc.gnu.org there is documentation with the details. But the gcc extensions can be very significant.
I was never much bothered by the bits that deviate from the C standard -- few compilers fulfill absolutely every detail, usually it's very obscure stuff, and I'm fairly sure that I never encountered any of it as a real issue during years of coding.
But I was never a fan of including the gcc extensions by default, unless it was a project for which I was absolutely sure that no other compiler besides gcc would ever be used. There's no feedback indicating that you're using gcc-specific features (with -std=g99, GNU_SOURCE is implicitly defined by default), making it very easy to use something that wouldn't necessarily build with another compiler. So at some point I got into the habit of setting -std=c99 in every build configuration.
It's worth noting that this thread has drifted away from the subject of the Pico C SDK. There's an issue at the SDK repo for clang support, which is currently set for the 1.7.0 milestone. Until then, Pico SDK projects are in fact among those for which we're gcc all the way.