]> granicus.if.org Git - re2c/commit
Don't assert that comparator arguments are non-equal.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 1 Aug 2017 07:22:14 +0000 (08:22 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 1 Aug 2017 07:22:14 +0000 (08:22 +0100)
commita62c8f08142f47b6436bab87c69887a3d9f0ba67
tree91fb26466d69e00cefc123bf3fab1791e2ff4298
parent1e0a00dea46cd98b1f1a1ad2e9371a83239a9e23
Don't assert that comparator arguments are non-equal.

Comparator is used in 'std::sort'.
All items in closure have unnique TNFA states, therefore we assumed
that the compared items must always be different. However, 'std::sort'
does not have this requirement and some implementations of it compare
the element with itself.

The removed assert caused crashes with old version of GCC (4.2).

Thanks to Sergei Trofimovich for debugging the issue.
re2c/src/dfa/closure.cc