This is the mail archive of the
mailing list for the GDB project.
Re: The perils of strcmp_iw
On Sat, 8 Feb 2003 22:59:19 -0500, Daniel Jacobowitz <firstname.lastname@example.org> said:
strcmp_iw has the property of "foo == foo(arg)";
You doubtless know this already, but actually strcmp_iw doesn't have
that property: it has the property "foo(arg) == foo". Or, rather,
"foo(ANYTHING == foo", where ANYTHING doesn't have to end in a right
parenthesis. So strcmp_iw not only doesn't do clever parenthesis
checking, but it isn't even symmetric.
(And, of course, it's also unlike strcmp in another way, namely that
you can't use it to do sorting.)
Sigh. Still, it works pretty well, once you know its quirks.
Sounds like it could do with a better name.