[Bug c/18411] Warning not legitimate
SebastianR at gmx dot de
gcc-bugzilla@gcc.gnu.org
Mon Jul 4 01:38:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list