Low: fix compiler's complaints about possibly unaligned pointer access #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
and
The solution for the affected, historically packed structs (which is
the trigger of the possible unaligned access in the first place),
assuming we want to carry on with this binary terseness, is that
we assure the struct itself is always aligned per its first member.
This first member is hence automatically guaranteed to be aligned
just as well, and shall there be any other address-of referenced
members, they immediately follow (rule being that these are ordered
from the biggest natural alignment to the lowest, for which C11
_Alignof operator is used).
We build on already established assumptions that data declarations
are readily controllable with non-standardized attribute annotations.
Shall this (or reliance on C11 construct, but hey, it's 2020) be in
violation with universality (it apparently hadn't been so far), both
"packed" and "aligned" are to be to be conditionally dropped together
(which will also restore no-complaints state as a side effect).