[cfe-dev] __builtin_nan support
neil at daikokuya.co.uk
Mon May 19 15:27:30 PDT 2008
Nate Begeman wrote:-
> > + llvm::APInt Val(64, 0x7ff8000000000000ULL, false);
> > +
> > + char *endp = 0;
> > + uint64_t Significand = strtoull(data, &endp, 0);
> > Windows doesn't have strtoull.
> What's the suggested replacement?
I suggest you make a constructor in APFloat to take this kind of
input, rather than indirecting through APInt. It can already
convert decimals very efficiently (used for decimal->binary) and
then you nail the long-double case too, without stroull and friends.
More information about the cfe-dev