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

[C] Add support for alignof and its aliases #4075

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

braewoods
Copy link
Contributor

This was first added in C11 but has since been revised by C23. It functions like sizeof but returns alignment instead of size. So it is implemented as an extension of sizeof.

Copy link
Collaborator

@FichteFoll FichteFoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference for other curious people: https://en.cppreference.com/w/c/language/_Alignof

This was first added in C11 but has since been revised by C23.
It functions like sizeof but returns alignment instead of size.
So it is implemented as an extension of sizeof.
@deathaxe deathaxe merged commit b852edd into sublimehq:master Oct 30, 2024
1 check passed
@braewoods braewoods deleted the c-alignof branch October 30, 2024 21:29
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.

4 participants