Hi Hartmut - Hartmut Kaiser wrote:
There is no simple way to do so. But - depending on the urgency - this could be made available to you. It would be a matter of moving the formatting of the #line directives to a new preprocessor hook function, where you could customize the format in any way you prefer.
If you can point me to anything specific in the wave source, then I can write some code and test it. If not, I'll write my own code to post-process your #line output to get it back to a relative form. I think this would be a (very) good feature (as well as being gcc-compatible). It makes it easier to read compiler error messages when the source files are spread over several directories, and makes the messages more compact.
Or to make the output more gcc/cpp-compatible? There are a couple of other minor differences to gcc and mcpp: wave produces '#line n', for example, and the others produce '# n'.
What other differences do you have in mind?
The only other difference I've noticed is that gcc always starts its output with a line directive for the first source file; you don't put in line directives until you need to. The gcc way is potentially useful, because the parser (or whoever gets the wave output) doesn't need to have its own independent knowledge of what the first source file was.
FWIW, the gcc way of formatting the line directives as '# n' is not standards conformant. Actually, this output results in an illegal preprocessing directive.
Ah. Maybe some of the gcc people work for MS? :) Thanks - Paul