[riot-notifications] [RIOT-OS/RIOT] makefiles: Add -fwrapv to CFLAGS (#10748)
notifications at github.com
Thu Jan 10 15:13:35 CET 2019
### Contribution description
This commit makes overflow of signed integers to behave as expected by at 90%
of the C developers, even though overflow of signed integers are strictly
Note: Please do not add code relying on a specific behavior for the overflow of
signed integers, even though `-fwrpav` will make that code work. This is
intended to mitigate the risk of bugs in overflow checks being exploited,
not to encourage adding new bugs.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475 for details and see
http://c-faq.com/misc/intovf.html on how to implement overflow checks properly.
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
### Testing procedure
I guess if Murdock still compiles everything, this should be sufficient
### Issues/PRs references
This issue was discussed in https://github.com/RIOT-OS/RIOT/pull/10740, but that PR is not much related otherwise
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* makefiles: Add -fwrapv to CFLAGS
-- File Changes --
M makefiles/cflags.inc.mk (11)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications