C 2011 Standard and current FOSS implementations

Today I got to know that C has a new standard released in 2011. You can find a detailed Dr. Dobbs’s article on the subject. So far I havent come across any Open Source compiler that fully implements C11 features. Clang and GCC are yet to fully support this standard.

Clang has added support for anonymous structs and anonymous unions:

Clang 3.1 adds support for anonymous structs and anonymous unions, added in the latest ISO C standard. Use -std=c11 or -std=gnu11 to enable support for the new language standard. The new C11 features are backwards-compatible and are available as an extension in all language modes.

GCC has implemented C11 in parts as mentioned in its documentation below:

A fourth version of the C standard, known as C11, was published in 2011 as ISO/IEC 9899:2011. GCC has limited incomplete support for parts of this standard, enabled with -std=c11 or -std=iso9899:2011. (While in development, drafts of this standard version were referred to as C1X.)

Which means, that not only would the complier needs feature additions, but also the C library too. Which makes Glibc a candidate for code additions: Sourceware Bug 14092 for adding C11 threads.

Way to go!

References:

http://stackoverflow.com/questions/9804594/compilers-that-support-c11

http://llvm.org/releases/3.1/docs/ClangReleaseNotes.html#cchanges

http://gcc.gnu.org/onlinedocs/gcc/Standards.html

About these ads