https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103699

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You might want to read
https://blog.regehr.org/archives/1307
https://developers.redhat.com/blog/2020/06/03/the-joys-and-perils-of-aliasing-in-c-and-c-part-2
https://developers.redhat.com/blog/2020/06/02/the-joys-and-perils-of-c-and-c-aliasing-part-1

And gcc had some warnings in the past but so many false negatives that gcc had
cut back on them. C/c++ aliasing rules are simple but using pointers and
casting to a different type are a sure way to push towards having undefined
behavior in your code.

Reply via email to