Skip to content
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

Merged
merged 2 commits into from
Jul 30, 2020
Merged

Add support for static_assert #1124

merged 2 commits into from
Jul 30, 2020

Conversation

jmr
Copy link
Contributor

@jmr jmr commented Jul 27, 2020

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

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
@oliverschmidt oliverschmidt merged commit d0c7108 into cc65:master Jul 30, 2020
@oliverschmidt
Copy link
Contributor

@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.

@acqn
Copy link
Contributor

acqn commented Jul 31, 2020

MSVC project file build is broken due to the newly added source file(s) not registered in src/cc65.vcxproj....

@oliverschmidt
Copy link
Contributor

Thanks for the hint. I'll take care of the MSVC file.

oliverschmidt added a commit that referenced this pull request Aug 1, 2020
@oliverschmidt
Copy link
Contributor

Done: e1043fa

@jmr
Copy link
Contributor Author

jmr commented Aug 1, 2020

Sorry about that. Thanks for the fix.

@jmr jmr deleted the static-assert branch August 1, 2020 13:54
@jmr jmr mentioned this pull request Aug 1, 2020
jmr pushed a commit to jmr/cc65 that referenced this pull request Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants