Code Generator: usage of the #line directive

Olivier Delannoy olivier.delannoy@gmail.com
Fri Mar 30 10:17:00 GMT 2007


Hello,

I have written a code generator which takes an XML document and
generate a C++ file. The XML document contains text element which
contains C++ code. I would like to be able to locate error message
based on the start of the text element. I think the #line directive is
to be use for this but I have trouble marking the end of an included
section.  The code from the XML document behave really like an include
and I would like to report errors in the same way.

Thanks for your help.


-- 
Olivier Delannoy
ATER
PRiSM Laboratory
Versailles University, FRANCE



More information about the Gcc-help mailing list