3 ms·
Shame about C99 support. I'm afraid to even ask about C11.
by Keyframe 14y ago
Shame about C99 support. I'm afraid to even ask about C11.
- fafner 14y agoI wonder why there is no c11status page for GCC. They already added support for many things to GCC 4.6/4.7. http://gcc.gnu.org/gcc-4.7/changes.html http://gcc.gnu.org/gcc-4.7/changes.html > There is support for some more features from the C11 revision of the ISO C standard. GCC now accepts the options -std=c11 and -std=gnu11, in addition to the previous -std=c1x and -std=gnu1x. > * Unicode strings (previously supported only with options such as -std=gnu11, now supported with -std=c11), and the predefined macros __STDC_UTF_16__ and __STDC_UTF_32__. > * Nonreturning functions (_Noreturn and <stdnoreturn.h>). > * Alignment support (_Alignas, _Alignof, max_align_t, <stdalign.h>). > * A built-in function __builtin_complex is provided to support C library implementation of the CMPLX family of macros. http://gcc.gnu.org/gcc-4.6/changes.html http://gcc.gnu.org/gcc-4.6/changes.html > There is now experimental support for some features from the upcoming C1X revision of the ISO C standard. This support may be selected with -std=c1x, or -std=gnu1x for C1X with GNU extensions. Note that this support is experimental and may change incompatibly in future releases for consistency with changes to the C1X standard draft. The following features are newly supported as described in the N1539 draft of C1X (with changes agreed at the March 2011 WG14 meeting); some other features were already supported with no compiler changes being needed, or have some support but not in full accord with N1539 (as amended). > * Static assertions (_Static_assert keyword) > * Typedef redefinition > * New macros in <float.h> > * Anonymous structures and unions and glibc added support http://sourceware.org/ml/libc-alpha/2012-06/msg00807.html http://sourceware.org/ml/libc-alpha/2012-06/msg00807.html > * ISO C11 support: > > + define static_assert > > + do not declare gets > > + declare at_quick_exit and quick_exit also for ISO C11 > > + aligned_alloc. NB: The code is deliberately allows the size parameter > to not be a multiple of the alignment. This is a moronic requirement > in the standard but it is only a requirement on the caller, not the > implementation. > > + timespec_get added > > + uchar.h support added > > + CMPLX, CMPLXF, CMPLXL added > > Implemented by Ulrich Drepper. But I don't know what's still missing and I doubt that glibc will implement the range check library (Annex K).
- micampe 14y agoThe table is inaccurate on that: GCC is listed as full support, but it doesn't implement at least the same feature clang is missing (floating point pragmas), which is the only C99 missing feature in clang, as far as I know, so I don't understand the difference.
- pjmlp 14y agoC99 is probably going to be the last C standard most commercial compiler vendors will care about. On the desktop and server the world is moving from C to C++/Objective-C, with C still being very important in the embedded space. Microsoft's official position is C++ is the future and C is legacy on Windows platforms. Even the two most important open source C and C++ compilers are now both written in C++, although given their open source nature, I expect they to keep on supporting C contrary to the commercial vendors.
- ori_b 14y agoC11 language support seems to be complete since GCC 4.7.
- pjmlp 14y agoMy main point was about commercial compiler vendors.
- ori_b 14y agoIntel's C compiler also claims to support most of C11, as, apparently, does Clang. That covers the popular Unix compilers. Microsoft seems to be the big outlier, but they don't even care about C99. I admit, though, I have no idea what commercial compilers are popular in the Windows world. I am under the impression that you either used Intel's compiler, Microsoft's compiler, or a free port of the Unix toolchain, but I don't really do Windows development.
- pjmlp 14y agoYou left out all the big commercial UNIX vendors, embedded market, real time operating systems, HPC and game development.
- ori_b 14y agoHPC is usually one of IBM XLC, Intel ICC, or GCC. All of them support most or all of the C11 language features. For commercial unixes, it's hard to find documentation on C versions supported by Oracle Solaris Studio, but it was last released in 2011. HPUX ACC was last released in 2010, so I would be very surprised if it supported the 2011 C standard already. That doesn't meant it won't, but it does mean that it moves slowly. Not surprising, since large unix vendors operate in a market where stability is valued above most other things. IBM XLC already supports C11. The embedded market tends to use GCC, from what I can tell, although it may vary widely by company. ArmCC is around, but the last major looks like it was in 2011 (minor updates since). I don't know what future versions will bring, but I'd be surprised if they don't at least end up supporting the memory model and atomics. These are /useful/ when writing embedded code. RTOS development is pretty much the same situation as embedded. From what I understand, game development usually isn't done in C, but I'd be very curious to know how the compilers there differ from compilers used for normal desktop applications. Which ones are normally used for game development? EDIT: And, apparently, Microsoft is going to be adding some C11 features to C, as well as most of C99, because it will be piggybacking off the C++11 updates. So even the company that said it was ignoring anything newer than C90 is adding C11 features. That was a surprise to me. Perhaps you could list some widely used compilers that have said they will not be moving towards C11 support?