The perils of strcmp_iw

David Carlton carlton@math.stanford.edu
Tue Feb 11 22:04:00 GMT 2003


On Sat, 8 Feb 2003 22:59:19 -0500, Daniel Jacobowitz <drow@mvista.com> 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.

David Carlton
carlton@math.stanford.edu



More information about the Gdb mailing list