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
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 17 Jun 2003 13:42:37 -0700
- Subject: Re: [C++ PATCH]: make cp_tree_equal unequivocal
- References: <3EEF17B4.3030503@codesourcery.com>
On Tue, 2003-06-17 at 06:29, Nathan Sidwell wrote:
> Hi,
> this patch stops cp_tree_equal returning 'don't know'.
> I couldn't think of a reason why two different IDENTIFIER_NODEs mean
> the same thing here, but thought I'd better check before installing.
>
> booted & tested on i686-pc-linux-gnu, ok?
The comment at the top of cp_tree_equal should change, right? (It no
longer is ever supposed to return -1.)
Does your change make sense for comptypes, which seems to be the only
places checking for a negative return value? It looks to me like for
UNBOUND_CLASS_TEMPLATE comptypes would have always returned 0; as far as
I can see cp_tree_equal always returns -1 for IDENTIFIER_NODES. (I'm
not sure that cp_tree_equal should even be *called* with an
IDENTIFIER_NODE; it really should get expressions, but that's another
issue...)
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com