https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104367
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Component|c |c++ --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- In the C case, I had thought we warned about return with a statement for a void return type but looks like I am wrong. This would have showed the issue too. Obviously for C++, it is not that useful due to templates and such. The non-null warning is not going to be useful in the general case really, it might have helped here but does not mean it will help in general.