This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/26542] bogus diagnostic with -pedantic?: format '%p'; expects type 'void*', but argument 2 has type 'A*'



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]