This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH]: make cp_tree_equal unequivocal


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]