[cfe-commits] Recent regression to APFloat?

Ted Kremenek kremenek at apple.com
Tue Dec 4 16:52:57 PST 2007


I'll investigate this tonight.  I introduced a change recently on how  
the APFloats are created from the parsed string representing the  
literal.

On Dec 4, 2007, at 4:37 PM, Steve Naroff wrote:

> Folks,
>
> I just noticed the bug below. This seems like a fairly recent
> regression.
>
> If you've been hacking in this area (and this "rings a bell", please
> speak up).
>
> Thanks,
>
> snaroff
>
> [snaroff:llvm/tools/clang] snarofflocal% cat floatbug.c
>
> static func() {
>   float f = 0.0;
> }
> [snaroff:llvm/tools/clang] snarofflocal% ../../Debug/bin/clang -ast-
> print floatbug.c
> typedef char *__builtin_va_list;
>
> static int func() {
>   float f = 4.29497e+09;
> }
>
> [snaroff:llvm/tools/clang] snarofflocal% ../../Debug/bin/clang -ast-
> dump floatbug.c
> typedef char *__builtin_va_list;
>
> static int func()
> (CompoundStmt 0x8061d0 <floatbug.m:2:15, line:4:1>
>   (DeclStmt 0x8060b0 <:0:0>
>     0x806170 "float f =
>       (ImplicitCastExpr 0x8060a0 <floatbug.m:3:13> 'float'
>         (FloatingLiteral 0x8061a0 <col:13> 'double'
> 4294967248.000000))"
>     (ImplicitCastExpr 0x8060a0 <col:13> 'float'
>       (FloatingLiteral 0x8061a0 <col:13> 'double'  
> 4294967248.000000))))
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list