free-semiring: remove the old implementation
fix building with GCC