Boost logo

Boost Users :

Subject: Re: [Boost-users] wave: changing to relative paths in #line output?
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2010-03-17 08:22:30


Paul,

> I'm evaluating wave as a cpp replacement. I'm having a problem at the
> moment in that the #line output shows the name of the source file as an
> absolute path, and my regressions are expecting a gcc-style relative
> path.
>
> Before I have a go at hacking this, can anyone tell me if there's some
> configuration that can be set to output relative paths?

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.

> 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?

FWIW, the gcc way of formatting the line directives as '# n' is not
standards conformant. Actually, this output results in an illegal
preprocessing directive.

Regards Hartmut

---------------
Meet me at BoostCon
www.boostcon.com


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