Do any c compilers perform any C1X functions?

Do any c compilers use any of the C1X functions?

PS: Is there a way to simulate some of these functions in current c compilers

+6
source share
4 answers

GCC 4.6 has some experimental support for C1X features:

There is currently experimental support for some features from the upcoming C1X version of ISO C. This support can be selected using -std = c1x or -std = gnu1x for C1X with GNU extensions. Please note that this support is experimental and may not be compatible with future releases to be consistent with changes to the standard C1X draft. The following features are recently supported, as described in project N1539 C1X (as amended at the WG14 meeting in March 2011); some other functions were already supported without the need to change the compiler or had some support, but not in full accordance with N1539 (as amended).

  • Static statements (keyword _Static_assert)
  • Typedef override
  • New macros in <float.h>
  • Anonymous Structures and Unions
+7
source

In addition to gcc, clang began to add support for C1x functions. In particular, there is support for _Generic and _Static_assert . Some other functions can also be implemented, but I have not tried them.

+7
source

Based on reading lists and gcc testsuite (ls gcc / gcc / testsuite / gcc.dg / c1x *):

  • I look like _Noreturn goes in gcc-4.7.
  • From testuite, it looks like unicode strings will also.
  • It also looks like CMPLX macros also work .
  • Maybe _ Generic is included in gcc-4.8.
+3
source

You can check out Pelles C out (available only for Windows).

+2
source

Source: https://habr.com/ru/post/896391/


All Articles