Do any c compilers implement any of the C1X features?
P.S.:Is there a way to emulate some of these features in current c compilers
GCC 4.6 has some experimental support for C1X features:
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
Besides gcc, clang has started to add support for C1x features. In particular, there is support for _Generic
and _Static_assert
. Some other features may be implemented as well, but I haven't tried them.
Based on perusal of the lists and the gcc testsuite (ls gcc/gcc/testsuite/gcc.dg/c1x*):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With