This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26542] bogus diagnostic with -pedantic?: format '%p'; expects type 'void*', but argument 2 has type 'A*'
- From: "vz-gcc at zeitlins dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jul 2006 17:02:59 -0000
- Subject: [Bug c/26542] bogus diagnostic with -pedantic?: format '%p'; expects type 'void*', but argument 2 has type 'A*'
- References: <bug-26542-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from vz-gcc at zeitlins dot org 2006-07-24 17:02 -------
I'd like to (probably uselessly but still) argue for reopening this bug and
removing this warning. The interpretation of the standard text is open to
questions: IMHO an "A *" pointer is a pointer to void, too, as any pointer in C
is, implicitely, pointer to void. But most importantly I think this warning is
absolutely useless and the only way to get rid of it is ugly (you need an
explicit cast to "void *").
But, again, the most important argument against this warning is that it's 100%
useless. Conversion of any pointer to "void *" is well defined and unambiguous
(even in presence of multiple inheritance) and there is just no situation
whatsoever in which this warning can indicate a real problem. Please consider
suppressing it, thanks in advance!
--
vz-gcc at zeitlins dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vz-gcc at zeitlins dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26542