https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71538
--- Comment #3 from sasho648 at gmail dot com --- But if it's NULL for the cast it'll invoke UB I believe. Shouldn't the optimizer assume that UB never occur?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71538
--- Comment #3 from sasho648 at gmail dot com --- But if it's NULL for the cast it'll invoke UB I believe. Shouldn't the optimizer assume that UB never occur?