https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61428
Bug ID: 61428 Summary: "maybe-uninitialized" is broken in all current versions (4.7-4.10) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: aladjev.andrew at gmail dot com Created attachment 32900 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32900&action=edit test.c Please checkout attached test.c. There are no variables in this file, that may be uninitialized. gcc-4.7.3 -Werror -pedantic -Wall -Wextra -std=gnu99 -pthread -pipe -O2 test.c -o test >> test.c: In function ‘func’: test.c:54:14: error: ‘lock_1’ may be used uninitialized in this function [-Werror=maybe-uninitialized] cc1: all warnings being treated as errors gcc-4.8.2 -Werror -pedantic -Wall -Wextra -std=gnu99 -pthread -pipe -O2 test.c -o test >> test.c: In function ‘func’: test.c:54:14: error: ‘lock_1’ may be used uninitialized in this function [-Werror=maybe-uninitialized] free ( lock_1 ); ^ cc1: all warnings being treated as errors gcc-4.9.0-pre9999 -Werror -pedantic -Wall -Wextra -std=gnu99 -pthread -pipe -O2 test.c -o test >> test.c: In function ‘func’: test.c:44:17: error: ‘lock_1’ may be used uninitialized in this function [-Werror=maybe-uninitialized] free ( lock_1 ); ^ cc1: all warnings being treated as errors gcc-4.10.0-pre9999 -Werror -pedantic -Wall -Wextra -std=gnu99 -pthread -pipe -O2 test.c -o test >> test.c: In function ‘func’: test.c:44:17: error: ‘lock_1’ may be used uninitialized in this function [-Werror=maybe-uninitialized] free ( lock_1 ); ^ cc1: all warnings being treated as errors