This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/65686] [5/6 regression] inconsistent warning maybe-uninitialized: warn about 'unsigned', not warn about 'int'
- From: "dimhen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Jun 2015 12:09:10 +0000
- Subject: [Bug middle-end/65686] [5/6 regression] inconsistent warning maybe-uninitialized: warn about 'unsigned', not warn about 'int'
- Auto-submitted: auto-generated
- References: <bug-65686-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65686
--- Comment #6 from Dmitry G. Dyachenko <dimhen at gmail dot com> ---
(In reply to Richard Biener from comment #5)
>
> Where does this obfuscated 'return *(e->pu)' come from?
If I remove aggregate then there are no warning.
i.e. this code produce no warning
mytype f(mytype *pu)
{
mytype x;
if(&x != pu)
__builtin_memcpy(&x, pu, sizeof(unsigned));
return x;
}