Re: [PATCH 7/6] fortran: fix pair_cmp qsort comparator

2017-07-23 Thread Thomas Koenig
Am 21.07.2017 um 16:29 schrieb Alexander Monakov: Bootstrapped and regtested on x86-64, OK for trunk? * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment. OK. Thanks for the patch! Regards Thomas

[PATCH 7/6] fortran: fix pair_cmp qsort comparator

2017-07-21 Thread Alexander Monakov
Hello, The final tie-breaker in pair_cmp comparator looks strange, it correctly yields zero for equal expr->symtree-n.sym values, but for unequal values it produces 0 or 1. This would be correct for C++ STL-style comparators that require "less-than" predicate to be computed, but not for C qsort.