options for compiling C using C++ compiler

John R x-list-subscriptions@hotmail.com
Tue Dec 13 04:25:00 GMT 2005


I'm working on a project where I post-process AST (.tu) output from gcc 
using the -fdump-translation-unit option.

Problem is the C compiler does not generate useful AST data. So I actually 
run the preprocessed source again thru g++ to get AST data. This works fine 
unless there are constructs not allowed under C++. Particular problems are 
bool and other keyword stuff and K&R style function declarations.

I'm trying to find the best way to minimize the problem via options or other 
ways. I already use "-fpermissive" and this eases it a bit.

Suggestions?

-J

_________________________________________________________________
DonÂ’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



More information about the Gcc mailing list