Message ID | 4443502.V1mhNqmMLq@polaris |
---|---|
State | New |
Headers | show |
Series | [Ada] Stabilize sort for -fdump-ada-spec | expand |
Index: c-ada-spec.c =================================================================== --- c-ada-spec.c (revision 271457) +++ c-ada-spec.c (working copy) @@ -679,8 +679,10 @@ compare_node (const void *lp, const void { const_tree lhs = *((const tree *) lp); const_tree rhs = *((const tree *) rp); + const int ret + = compare_location (decl_sloc (lhs, true), decl_sloc (rhs, true)); - return compare_location (decl_sloc (lhs, true), decl_sloc (rhs, true)); + return ret ? ret : DECL_UID (lhs) - DECL_UID (rhs); } /* Compare two comments (LP and RP) by their source location. */