|
Boost Users : |
Subject: Re: [Boost-users] wave: changing to relative paths in #line output?
From: Paul Johnson (sa212+boost_at_[hidden])
Date: 2010-03-17 10:26:17
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net