This is the mail archive of the gcc@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] |
You're right. I'll change this to: /* A stable comparison functor to sort trees. */ struct tree_compare_decl_uid { bool operator ()(const tree &xa, const tree &xb) const { return DECL_UID (xa) < DECL_UID (xb); } }; New patch attached. Thanks, -Aditya ---------------------------------------- > Date: Fri, 13 Mar 2015 19:02:11 +0000 > Subject: Re: Proposal for adding splay_tree_find (to find elements without updating the nodes). > From: jwakely.gcc@gmail.com > To: hiraditya@msn.com > CC: richard.guenther@gmail.com; stevenb.gcc@gmail.com; gcc@gcc.gnu.org > > Are you sure your compare_variables functor is correct? > > Subtracting the two values seems very strange for a strict weak ordering. > > (Also "compare_variables" is a pretty poor name!)
Attachment:
splay.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |