[riot-notifications] [RIOT-OS/RIOT] core: Fix undefined behaviour in C11 atomics (#11528)

Marian Buschsieweke notifications at github.com
Wed May 15 14:35:50 CEST 2019

### Contribution description
Casting pointers to `volatile` memory to pointers to regular memory is permitted, but using those pointers to access the memory results in undefined behavior. This PR changes the casts to no longer drop the volatile qualifier.

References: https://en.cppreference.com/w/c/language/volatile

### Testing procedure
Compile some applications before and after this PR. The output should not differ.

### Issues/PRs references

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * core: Fix undefined behaviour in C11 atomics

-- File Changes --

    M core/atomic_c11.c (44)

-- 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...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190515/07ae9ac0/attachment.html>

More information about the notifications mailing list