[LLVMdev] Buggy assertion in APFloat::convertFromHexadecimalString

Erick Tryzelaar idadesub at users.sourceforge.net
Thu Aug 20 16:39:31 PDT 2009


On Thu, Aug 20, 2009 at 10:51 AM, Erick
Tryzelaar<idadesub at users.sourceforge.net> wrote:
>
> Thanks Daniel and Enea for finding this! I'm adding a lot more test
> cases like this to APFloat's unittests so hopefully we won't have any
> other bugs lying around.

I just committed a big batch of unit tests for APFloat, As best as I
can tell, we're in compliance with C99's floating point standard,
ignoring the suffix:

floating-constant:
| decimal-floating-constant
| hexadecimal-floating-constant

decimal-floating-constant:
| fractional-constant exponent-part? floating-suffix?
| digit-sequence exponent-part floating-suffix?

hexadecimal-floating-constant:
| hexadecimal-prefix hexadecimal-fractional-constant
binary-exponent-part floating-suffix?
| hexadecimal-prefix hexadecimal-digit-sequence binary-exponent-part
floating-suffix?

fractional-constant:
| digit-sequence? .digit-sequence
| digit-sequence .

exponent-part:
| e sign? digit-sequence
| E sign? digit-sequence

sign:
| +
| -

digit-sequence:
| digit
| digit-sequence digit

hexadecimal-fractional-constant:
| hexadecimal-digit-sequence? . hexadecimal-digit-sequence
| hexadecimal-digit-sequence .

binary-exponent-part:
| p sign? digit-sequence
| P sign? digit-sequence

hexadecimal-digit-sequence:
| hexadecimal-digit
| hexadecimal-digit-sequence hexadecimal-digit

floating-suffix: one of
| f
| l
| F
| L




More information about the llvm-dev mailing list