-fdump-translation-unit considered harmful

Stefan Strasser sstrasser@systemhaus-gruppe.de
Tue Dec 21 00:45:00 GMT 2004


Pjotr Kourzanov schrieb:
>> For anyone interested in interfacing proprietary programs to GCC, that's
>> not even much of a speed bump.
>>
>> As soon as that binary API is written, someone will write a small calling
>> program that will use the API to dump the translation unit into a nicely
>> documented XML format.  The dumper will, of course, be released under the
>> GPL.  Then the proprietary backend will simply read in the XML data.
> 
> 
>   I suspect the XML output thus generated will be comparable is size to 
> what -fdump-translation-unit generates now. As it is, it takes *ages* to 
> re-parse those megabytes of ASCII data (even for simple C source files 
> including lots of headers). The really problematic case is only when a 
> binary API at the tree level is exposed.

I really don't understand why this is so much of a political problem. I 
understand the intentions, but isn't compiling proprietary code with gcc 
the same? and that is explicitely allowed.
then, the API is already there, cp tree. it's just not very stable so 
another level of abstraction would be nice to make it stable. but I 
don't think this will prevent anyone to export data. (at least, not me)
to make things clear, I have no proprietary interest in this, but I am 
following the XML approach stated above for other reasons. (with the 
exception of "nicely documented" ;)


-- 
Stefan Strasser



More information about the Gcc mailing list