LWG 2381 clarifies that Stage 2 of num_get should check that the
to-be-accumulated character would be valid as the next character
in the accumulated sequence. This change adds the check (for
floating-point numbers) and a unit test with the example proposed
by LWG 2381. If this is approved, I'll see if integers need a
similar change.
I believe this fixes PR#17782:
https://llvm.org/bugs/show_bug.cgi?id=17782
We also hit this in the real world on FreeBSD 10.3.
I suppose I could use "& 0x5F" to avoid the branches in these comparisons of __x.