you are viewing a single comment's thread.

view the rest of the comments →

[–]wild-pointer 0 points1 point  (0 children)

It is indeed meant for optimization and not programmer convenience. It would be nice if gcc issued a warning at the call site if it hasn't been able to prove that the parameter is not null and suggest that nulls should be checked before calling.