https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87209
Bug ID: 87209
Summary: Wuninitialized or Wmaybe-uninitialized doesn't warn
when malloc's return value is used without being
initialized
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: prathamesh3492 at gcc dot gnu.org
Target Milestone: ---
There's no warnings emitted for the following test-case:
int f(void)
{
int *p = __builtin_malloc (sizeof (*p));
return *p;
}
I assume this should have been diagnosed with Wuninitialized or
Wmaybe-uninitialized ?
Thanks,
Prathamesh