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: "SebastianR at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2005 01:38:45 -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 SebastianR at gmx dot de 2005-07-04 01:38 -------
I think there might be an actual bug with this new warning:
In the qsort man page, it says you can use strcmp as the last argument to qsort.
So the types must be compatible, and it also works. However, this fails:
((int(*)(const void *, const void *)) strcmp) ("a", "b");
The type conversion is exactly the same, only this time it is called directly.
I think this bug/feature is really annoying, especially (as already said) the
fact that it compiles but crashes at run time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18411