This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]: make cp_tree_equal unequivocal
On Wed, 2003-06-18 at 08:15, Nathan Sidwell wrote:
> Mark Mitchell wrote:
>
> >
> > Wow, this is very exciting -- lots of cruft going away.
> >
> > How did you get away with assuming comp_target_types never sees an
> > ARRAY_TYPE? What about something like "int (*p)[5]"?
> Yes, it took me ages to satisfy myself that was safe. comp_target_types
> looks like this
>
> if (is_pointer(t) && count > 0)
> {
> ...
> if (is_array (TREE_TYPE (t))
> return something else
> }
>
> if (is_an_array) {/*unreachable*/}
>
> Then it was a small matter of proving that all entry points into the
> (recursive) comp_target_types call graph had count > 0, and never had
> an array.
OK, then. Thanks for doing all the legwork...
> I agree, but I have not changed that behaviour. I refactored
> if (OP1(t1) == OP1(t2)) recurse
> return false;
> to
> if (OP1(t1) != OP1(t2))
> return false
> recurse
OK -- I misread the patch. Thanks for walking me through it.
Go for it!
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com