The DMS Reengineering Toolkit
(http://www.semdesigns.com/Products/DMS/DMSToolkit.html) can be used
for this purpose. You can write many transforms directly in the
surface syntax of "C", that are applied to a parse tree; the result is
prettyprinted. For a very simple example, to fold nested if
statements together, you can write a rule (untested) as follows:

Dominic Morris <djm@jb.man.ac.uk> wrote in message> Would someone point me in the direction of an optimizing C -> C> compiler i.e. one that takes in a source file and then emits an> optimized source file, assuming that such a program is freely> available.