-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for static_assert #1124
Conversation
Add C11's _Static_assert and static_assert macro. This is like #error, but is handled at a later stage of translation, so it is possible to check sizes of types, values of enums, etc. https://en.cppreference.com/w/c/language/_Static_assert https://port70.net/~nsz/c/c11/n1570.html#6.7.10
@jmr: Maybe it would be appropriate to have a new section in https://cc65.github.io/doc/cc65.html#s5, wouldn't it? At least it has already a section starting with Binary literals, a C++14 feature and a GCC C extension, are accepted. which seems to be a comparable topic. The source code for https://cc65.github.io/doc/cc65.html#s5 is located at https://github.com/cc65/cc65/blob/master/doc/cc65.sgml#L634. |
MSVC project file build is broken due to the newly added source file(s) not registered in |
Thanks for the hint. I'll take care of the MSVC file. |
Done: e1043fa |
Sorry about that. Thanks for the fix. |
Add C11's
_Static_assert
and static_assert macro.This is like
#error
, but is handled at a later stageof translation, so it is possible to check sizes of
types, values of enums, etc.
https://en.cppreference.com/w/c/language/_Static_assert
https://port70.net/~nsz/c/c11/n1570.html#6.7.10