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

Dmitri Gribenko gribozavr at gmail.com
Wed Sep 19 13:51:48 PDT 2012

On Wed, Sep 19, 2012 at 11:28 PM, Shuang GAO <gaoshuang at gmail.com> wrote:
> 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...

Pretty-printing and dumping code exists mainly for debugging (to
inspect AST nodes in the debugger) and has almost no tests.  So it is
not a surprise that we print something incorrectly.

Patches are always welcome!  If you are interested in fixing this,
take a look at StmtPrinter::VisitFloatingLiteral function.


(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/

More information about the cfe-dev mailing list