This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/29827] Assigning function with a char param emits a spurious warning
- 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: 14 Nov 2006 10:09:26 -0000
- Subject: [Bug c/29827] Assigning function with a char param emits a spurious warning
- References: <bug-29827-11334@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-11-14 10:09 -------
This is not a bug, the reason is because
void foo(char);
void (*f1)() = foo;
For foo, the prototype is not using int but instead char (or short) and f1 is
not reallying having a prototype (old K&R rules).
Comeau C rejects this code as invalid with about the same error message as our
warning.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29827