help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ compiler


From: Paul Pluzhnikov
Subject: Re: g++ compiler
Date: Sat, 08 Oct 2005 09:30:09 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Pascal Bourguignon <spam@mouse-potato.com> writes:

> Paul Pluzhnikov <ppluzhnikov-nsp@charter.net> writes:
>
>> AFAIK it lacks the
>> machinery to print (reconstruct) internal representation back as
>> valid C++. Such reconstructor is entirely non-trivial.
>
> Wrong: gccxml

Gccxml does *not* reconstruct back valid C++.
Further, gccxml FAQ says:

  Why are C++ function bodies not dumped in XML?

  The original sponsors of the project had no need for function
  bodies. ...

> You don't need to enter the entrails of g++.

It depends on what the transformation is.

You most certainly need to enter entrails of g++ if you are to
parse comments and generate new C++ code that depends on what has
been parsed so far (or what will be parsed soon).

> It can be done in one week, with the right tools.

Depends on what "it" is, doesn't it?

> Oops, sorry, gccxml only does the declarations, not the bodies.
> But you don't need it, just use -fdump-tree-original:
>
> g++ -c -fdump-tree-original test-body.c

That doesn't produce valid C++ either. 

I'll pay you US$1000 if you can turn the "test-body.c.original" back
into valid C/C++ in a month (for every test in the gcc test suite;
the reconstructed C/C++ must be semantically equivalent to the original).

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]