Szymon Janc <email@example.com> writes:
(resending to mailing list)
On Friday, 31 March 2017 10:21:21 CEST Marcus Shawcroft wrote:
On 31 March 2017 at 08:33, Jukka Rissanen-Wnull-dereference has effect only if -fdelete-null-pointer-checks is set
I think we should set the -fno-delete-null-pointer-checks as SzymonWe should understand the code size implication of that decision before
commented in other reply.
changing the out of box behaviour.
Another option might be to have a test compile run against each
submitted patch with:
-Wnull-dereference -fno-delete-null-pointer-checks -Werror
So we could either make GCC warn when it is eliminating code under NULL check
or tell it to not eliminate that code at all (and thus get no
Adding the warnings, I think, is the best way forward.
Keeping the checks after the NULL pointer is accessed gains us little,
we are already in undefined behaviour land.
Zephyr-devel mailing list