Re: [Boost-bugs] [Boost C++ Libraries] #1673: wave misses to inject #line directive

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1673: wave misses to inject #line directive
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-03-05 21:29:14


#1673: wave misses to inject #line directive
--------------------------------------+-------------------------------------
  Reporter: stefan | Owner: hkaiser
      Type: Bugs | Status: new
 Milestone: Boost 1.35.0 | Component: wave
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Comment (by stefan):

 One further comment:

 I believe wave should always strive to either reproduce the input (i.e.
 preserve whitespace, linebreaks, etc.) or inject #line directives so all
 non-synthesized tokens appear at the same logical location as in the
 input.

 Thus, in this particular case, there are two things to consider:

 1) the #line directive that gets generated in 'wave test.cc' should appear
 not before the next statement / declaration, but right after the expanded
 macro (i.e. before th "};" ending the 'foo' definition. (Just imagine what
 happens if the ';' was missing, and the compiler was to generate an error
 message. It could only print out the correct location if the '#line' was
 issued prior to that point.)

 2) in the second case, the #line directive may be omitted if wave would
 inject enough linebreaks at the macro expansion site, so all following
 tokens just happen to be correctly placed.

 Many thanks for working on this !

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1673#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC