[Bug c/56980] Misleading note
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 16 15:26:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56980
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-04-16
Ever Confirmed|0 |1
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-16 15:25:58 UTC ---
I think I have seen similar bugs in the pretty-printer with typedefs.
BTW, Clang gets it perfect:
pr56980.c:6:8: warning: incompatible pointer types passing 'struct B *' to
parameter of type 'B *' (aka 'struct A *') [-Wincompatible-pointer-types]
foo ((struct B *) x);
^~~~~~~~~~~~~~
pr56980.c:2:14: note: passing argument to parameter here
void foo (B *);
^
pr56980.c:11:7: warning: incompatible pointer types initializing 'B *' (aka
'struct A *') with an expression of type 'struct B *'
[-Wincompatible-pointer-types]
B * y = (struct B *) x;
^ ~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list