-
Notifications
You must be signed in to change notification settings - Fork 2.1k
makefiles/cflags.inc.mk: Add -Wcast-align #14955
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
Conversation
Let's see how many issues this uncovers. |
Oh oh :-( Sounds like some nights of bug fixing. |
How many of these are there? Do we need to enable them gradually? |
I'm now back from parental leave. So be prepared for a bunch of bugfix PRs addressing the issues unveiled by this PR ;-) I hope to have RIOT's code base cleaned up by the end of the week. So I think we don't need to enable this gradually. Maybe there are only just a few issues - but in very central places -, resulting in the high number of build failures. |
7e6a8da
to
17b6eb4
Compare
9eb8806
to
cf09a1c
Compare
6a2b1e9
to
ccdf978
Compare
Also sort disabled CFLAG warnings alphabetically.
This should be reverted and properly fixed.
Also sort flags alphabetically
Also split compiler flags into individual lines and sort them alphabetically.
ef757be
to
2145ca0
Compare
2145ca0
to
63b54b5
Compare
Thanks for the review! |
Contribution description
As the title says. This is useful to detect issues when doing things like
Because in the above example
foo
has an alignment requirement of 1 byte, butbar
has (on most 32 bit archs) an alignment requirement of 4 bytes. Unaligned writes will (depending on architecture) either result faults, writes to the next aligned address instead (usually rounded always down), or slow performance (and writes no longer being atomically).Testing procedure
Green Murdock.
Issues/PRs references
Depends on: