Could we have something like:
GPVAL_VERSION_MAJOR (5 for gnuplot 5.2.6),
GPVAL_VERSION_MINOR (2 for gnuplot 5.2.6)
variables?
We have GPVAL_VERSION now (5.2 for gnuplot 5.2.6), though it is a float, and by that it is AFAIK hard to use it for distinguishing e.g. 5.1 and 5.10 versions when doing that at scripts.
You do have a point that if the minor version reaches 10 there would be a problem.
Fortunately that is unlikely to happen any time soon. Historically it has been 2-3 years between minor versions and there has never been a release with minor version greater than 8. So even if we continue the current scheme of even-numbers only for release minor versions a hypothetical 5.10 wouldn't come around until 2025 at the earliest. More likely we would bump the major version to 6 instead.
I understand that it is a negligible thing, though if thouse variables would materialize at some point, there would be a relief on that for me: I always feel as a sinner when I compare to exact float numbers :-)