• R/O
  • SSH

libctools: Commit

This library contains code that extends and simplifies different operations
for C language based programs.


Commit MetaInfo

Revision098aa5fa6f4176afe98a40f07649a7d2a5c576a4 (tree)
Zeit2018-12-03 16:24:01
AutorSergey Gusarov <laborer2008@gmai...>
CommiterSergey Gusarov

Log Message

Added support for C18 language standard

Ändern Zusammenfassung

Diff

diff -r 647b397b6d3c -r 098aa5fa6f41 include/ctools/predef/language.h
--- a/include/ctools/predef/language.h Wed Oct 10 14:51:52 2018 +0300
+++ b/include/ctools/predef/language.h Mon Dec 03 10:24:01 2018 +0300
@@ -41,6 +41,14 @@
4141 # define CT_LANG_C11
4242 #endif
4343
44+#ifdef CT_LANG_C18
45+# error CT_LANG_C18 must be undefined
46+#endif
47+
48+#if defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 201710L)
49+# define CT_LANG_C18
50+#endif
51+
4452
4553 #ifdef CT_LANG_CXX11
4654 # error CT_LANG_CXX11 must be undefined
diff -r 647b397b6d3c -r 098aa5fa6f41 tests/src/predef/test_language.c
--- a/tests/src/predef/test_language.c Wed Oct 10 14:51:52 2018 +0300
+++ b/tests/src/predef/test_language.c Mon Dec 03 10:24:01 2018 +0300
@@ -33,6 +33,8 @@
3333 int a = 1;
3434 #elif defined (CT_LANG_C11)
3535 int a = 2;
36+#elif defined (CT_LANG_C18)
37+ int a = 2;
3638 #elif defined (CT_LANG_CXX11)
3739 int a = 3;
3840 #elif defined (CT_LANG_CXX14)
Show on old repository browser