https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114791
--- Comment #5 from Urs Janßen ---
-Wanalyzer-fd-leak has the same issue, no warning given for:
#define _DEFAULT_SOURCE 1
#include
#include
#include
#include
#include
int main(void);
int main(void) {
int fd = -1;
int i = 0;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114791
--- Comment #4 from Andrew Pinski ---
Interesting, with -O0, there is a warning but that can be turned into a false
positive if you enable the "missing:" section.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114791
--- Comment #3 from Urs Janßen ---
Comment on attachment 57998
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57998
minimal test case
>#include
>#include
>#include
>#include
>
>int main(void);
>
>int main(void) {
>FILE *fp =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114791
Andrew Pinski changed:
What|Removed |Added
Keywords||diagnostic
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114791
--- Comment #1 from Urs Janßen ---
Created attachment 57999
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57999=edit
preprocessed example