This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18411] Warning not legitimate
- From: "manus at eiffel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2004 23:34:38 -0000
- Subject: [Bug c/18411] Warning not legitimate
- References: <20041109232340.18411.manus@eiffel.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From manus at eiffel dot com 2004-11-09 23:34 -------
Also one thing I forgot to add. Is that if you replace `char' by `int' then
there is no warning at all:
extern void f();
void g(int a) {
void * fnptr = f;
((void (*) (int)) fnptr) (a); /* Ok. */
((void (*) (int)) f)(a); /* Not Ok. */
}
Why `char' does trigger the warning and not `int'? This looks like a bug to
me.
Thanks,
Manu
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18411