Returning a null pointer should be fine
Closed this issue · 1 comments
brevzin commented
Short reproduction (because creduce is awesome):
int *a() { return __null; }
emits:
/tmp/tmp.fRNdhfhcDt/foo.cxx:1:12: warning: returning a null pointer where a non-null pointer is expected [-Wlifetime-null]
int *a() { return __null; }
^~~~~~~~~~~~~
Why is non-null expected?
mgehre commented
Yes, that's clearly a bug.