https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
Gleb Fotengauer-Malinovskiy changed:
What|Removed |Added
CC||glebfm at altlinux dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
--- Comment #6 from Xi Ruoyao ---
(In reply to Christophe Lyon from comment #5)
> Not sure how to update/fix the testcases though?
> Since they get the declaration of fclose from stdio.h, we'd need to make
> dg-error conditional to the glibc ver
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
--- Comment #5 from Christophe Lyon ---
Not sure how to update/fix the testcases though?
Since they get the declaration of fclose from stdio.h, we'd need to make
dg-error conditional to the glibc version in use, which seems unpractical.
Should
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
Christophe Lyon changed:
What|Removed |Added
CC||clyon at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
Xi Ruoyao changed:
What|Removed |Added
URL|https://sourceware.org/pipe |https://sourceware.org/git/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
--- Comment #2 from David Malcolm ---
Thanks for filing this bug.
I think -fanalyzer should warn about fclose(NULL), but not for free(NULL).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
--- Comment #1 from Ivan Sorokin ---
Generalizing. Perhaps similarly free(NULL) can be detected?
void* obj = malloc(...);
if (!obj)
{
free(obj);
return false;
}
Unliky fclose(NULL), free(NULL) is completely well defined operation, but