This is the mail archive of the
mailing list for the GDB project.
Re: The perils of strcmp_iw
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb at sources dot redhat dot com
- Date: 11 Feb 2003 14:04:03 -0800
- Subject: Re: The perils of strcmp_iw
- References: <20030209035919.GA7431@nevyn.them.org>
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.