[commit] Deprecate remaining STREQ uses
Andrew Cagney
cagney@gnu.org
Tue Nov 25 18:42:00 GMT 2003
>> You'll now appreciate my paranoia :-)
>>
>> So, should the transformation be the strictly mechanical inline expansion:
>>
>> STREQ(a,b) => (*(a) == *(b) ? !strcmp ((a), (b)) : 0)
>>
>> or also include a simplification leading to:
>>
>> STREQ(a,b) => (strcmp ((a), (b)) == 0)
>
>
> Personally, I recommend the latter - I think part of the motivation for
> eliminating STREQ was to get rid of that extra test, right? If you
> want to do this mechanically, you can just change the definition of
> STREQ first, of course.
My question is somewhat retorical. I'd expect everyone to express a
preference for the latter. What's needed is for people to recognize
that such a transformation could potentially alter the program's
behavior. It shouldn't but if it does it's not my fault.
Andrew
More information about the Gdb-patches
mailing list