https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65686
Bug ID: 65686 Summary: incorrect warning maybe-uninitialized Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: dimhen at gmail dot com gcc version 5.0.0 20150404 (experimental) [trunk revision 221866] (GCC) $ cat x.i typedef unsigned mytype; // 'int' fixes issue struct S { mytype *pu; }; mytype f(struct S *e) { mytype x; if(&x != e->pu) __builtin_memcpy(&x, e->pu, sizeof(unsigned)); return x; } $ gcc -fpreprocessed -Werror -Wall -O2 -c x.i x.i: In function âfâ: x.i:9:10: error: âxâ may be used uninitialized in this function [-Werror=maybe-uninitialized] mytype x; ^ cc1: all warnings being treated as error