X
xin1wang1
I have just checked the faq and some refs on my bookshelf, but fail to
find an answer to my following question:
I am developing a code generator which generates c++ code from some
interface definitions (xml) .... The generated code needs to be
compiled against some other manully written code. If some prototype
mis-match between the generated code and the manul code, I would like
the compiler to report the problem by pointing out the location of the
problematic interface definition in the xml file, rather than reporting
error (prototype mismatch) pointing to the generated c++ file.
I guess I can do this by inserting
# <line> "<text>" <list of numbers>
in the generating C++ code. This causes the c++ compiler to report the
error as:
<text>:<line+delta> ....
My questions are:
1. whether this is portable, as I don't want the geneated code to be
platform dependent.
2. what is the <list of numbers>'s standard format and usefulness?
find an answer to my following question:
I am developing a code generator which generates c++ code from some
interface definitions (xml) .... The generated code needs to be
compiled against some other manully written code. If some prototype
mis-match between the generated code and the manul code, I would like
the compiler to report the problem by pointing out the location of the
problematic interface definition in the xml file, rather than reporting
error (prototype mismatch) pointing to the generated c++ file.
I guess I can do this by inserting
# <line> "<text>" <list of numbers>
in the generating C++ code. This causes the c++ compiler to report the
error as:
<text>:<line+delta> ....
My questions are:
1. whether this is portable, as I don't want the geneated code to be
platform dependent.
2. what is the <list of numbers>'s standard format and usefulness?