[LLVMdev] APFloat: assertion for convertFromString(toString(infty))
Johan Engelen
jbc.engelen at swissonline.ch
Sat Mar 7 05:58:47 PST 2015
Hello all,
I've stumbled across a problem where a string generated by
APFloat::toString() results in an assertion when passed to
APFloat::convertFromString().
The problem is simple:
toString() generates "-Inf" and "+Inf" (line 3550 in
/lib/Support/APFloat.cpp)
convertFromString only recognizes "-inf" and "inf" (line 2617 in
/lib/Support/APFloat.cpp)
How would you like me to fix this? Expand the set of accepted strings
for convertFromString, or modify toString to output "inf" and "-inf"?
(In LDC we started using APFloat's convertFromString() and hit upon this
problem.)
Thanks,
Johan
More information about the llvm-dev
mailing list