Re:Useful GCC warning options not enabled by -Wall -Wextra
by chocolatebunny on Wednesday October 04, 2017 @04:08PM
(#15404104)
I'm confused by -Wrestrict. Isn't the whole point of the restrict keyword aliasing like that? what's the point of restrict if there is no enforcement by default?
[ Parent
| on HN ]
Re:Useful GCC warning options not enabled by -Wall -Wextra
by zuzun on Wednesday October 04, 2017 @05:17PM
(#15404785)
The restrict keyword is supposed to enable optimizations, not to increase safety. You promise you won't access the memory location through different pointers and the compiler throws some precautions overboard.