This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: comparing pointers inside builtins.c
>>>>> "Zack" == Zack Weinberg <zack@wolery.cumb.org> writes:
Zack> Looking a bit more deeply, we already have simple_cst_equal.
Good spotting. I forgot about that.
Zack> This unfortunately does not do what I want; it treats all
Zack> DECLs as different, whether they are or not. I'm not sure
Zack> why. It's a shame, because otherwise that routine does
Zack> exactly what I want - I may try changing it and see if
Zack> anything breaks.
That sounds reasonable. Be a little careful, though, when using this
function will return true when presented with two copies of `f(3)'
even though they may not yield the same value. (And other similar
constructs.) Even TREE_SIDE_EFFECTS isn't good enough; it might be
that something besides the calls to `f' will change the return values,
say.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com