Skip to content

Emitting C99 or C11? #73

Answered by edubart
stefanos82 asked this question in Q&A
Jun 17, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Nelua does not depend on C11. It does emit some C11 specific code like _Noreturn, _Static_assert, but they are all used through ifdefs so the code can also compile on old compilers that don't support C11.

The C imported functions in https://nelua.io/clibraries/ are provided as convenience, and it's up to the user to choose to use it or not, in case the user does not want to depend on C11 functions just don't use C11 specific functions. For example, C.timespec_get is only available in C11, thus you could avoid it. But note that the majority functions there are available in C99, C11 had just a few additions. The Nelua standard library does not use any C11 function and should remain this way.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@stefanos82
Comment options

@edubart
Comment options

@stefanos82
Comment options

Answer selected by edubart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants