[cfe-dev] a basic question about stmt printPretty() and float point constant without "f"

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Thu Sep 20 07:42:29 PDT 2012


Am 19.09.2012 22:28, schrieb Shuang GAO:
> When I use printPretty() of stmt for a stmt as following:
>       x = 1.0f/3.0f;
> I got
>       x=1/3;
> Would anyone help me to know what i should do to keep the ".0" in the
> dumped code. I tried to look through PrintingPolicy struct, but have no
> idea for this...
r164303 fixes the issue (kudos to Ben for looking at it). It will 
however print "1.F" instead of "1.0f". But there is no semantic 
difference between those two versions.

Best regards

More information about the cfe-dev mailing list