This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37724] New: "initialization from incompatible pointer type" does not say which field is being initialized
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2008 05:26:31 -0000
- Subject: [Bug c/37724] New: "initialization from incompatible pointer type" does not say which field is being initialized
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When I was upgrading the PS3 toolchain I found it would have been useful to
figure out which field of a struct was being initialized with this warning
turned on.
Take:
struct f
{
int *a;
};
char b[10];
struct f g = {b};
--- CUT ---
Currently we just get:
t.c:7: warning: initialization from incompatible pointer type
But with a large macro like what is in GCC sources, it is hard to figure out
which field has the incompatible pointer type.
Likewise for the diffs in signedness warning.
--
Summary: "initialization from incompatible pointer type" does not
say which field is being initialized
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37724