At the end of October 2019, GrammaTech was pleased to host WG14 (the C Standards Committee) in Ithaca, NY. The C committee is comprised of experts from industry and academia from all over the world. As the compiler front-end team manager, I represented GrammaTech on both the C and C++ standards committees and was the official host for the Ithaca meeting. The C committee meets two to three times a year to fix technical issues and consider new features for the next release of the standard. Currently, the committee is working hard on progressing the next release of C, called C2x. It is expected to be released sometime in the 2020-2029 time frame.
At the Ithaca meeting, the committee considered around forty proposals, but many of the proposals had some degree of overlap.
Several of the proposals are trying to re-unify the memory and object models for C and C++ as they relate to concurrency. In the C11 time frame, both the C and C++ standards committees collaborated together to bring threading and atomic constructs to the languages in such a way that the feature from one language could interoperate with the other language. For instance, you should be able to create an atomic object in C that is ABI-compatible with an atomic object in C++. However, in the intervening years, some minor unintentional differences have been introduced into both languages that the C committee is currently attempting to rectify. Most of these changes should not impact programmers due to them correcting deficiencies in the standard that may not be reflected in implementations. However, one change may impact existing code — the ATOMIC_VAR_INIT macro was deprecated in C17 and the committee is entertaining a proposal to officially remove it for C2x. This is because the ATOMIC_VAR_INIT macro is unnecessary (implementations do not require it to support global atomic initialization) and is fundamentally broken (you cannot use it to initialize a structure with more than one member due to the way a comma is interpreted by the preprocessor).
There were also several proposals by GrammaTech considered at the meeting. I have authored numerous proposals related to adding attribute syntax to C. Many of those proposals have already been adopted for C2x prior to the Ithaca meeting: WG14 N2335 adds the syntax for attributes, WG14 N2334 added the deprecated attribute, WG14 N2270 added the maybe_unused attribute, and WG14 N2267 added the nodiscard attribute. At the Ithaca meeting, WG14 N2408 was adopted to add the fallthrough attribute and the committee discussed papers relating to a mechanism for querying attribute support (WG14 N2411) and to unify the syntax for the _Noreturn function type specifier with the [[noreturn]] attribute in C++ (WG14 N2410).
One of the other large discussion topics at the Ithaca meeting was the continued integration of TS 18661 into C2x. This technical specification was produced by a study group within WG14 and introduces language and library bindings for the latest publication of the IEEE 754 floating-point standard. While C has optionally supported IEEE 754 bindings for a long time, the integration of the TS into the standard has raised some concerns due to the introduction of over 1700 new identifiers that could possibly clash with identifiers used by existing code. For this reason, the committee also discussed some proposals related to reserved identifiers and how the committee can protect itself from name collisions while not unduly restricting the identifiers allowed in user programs.
All told, the week in Ithaca was a productive one. The next C committee meeting will be in Freiburg, Germany in late March 2020.
Interested in learning more? Read our guide on “Advanced Static Analysis for C++”
{{cta(’42fd5967-604d-43ad-9272-63d7c9d3b48f’)}}