[Boost-bugs] [Boost C++ Libraries] #7159: Text-lines are processed as if they were preprocessing directives

Subject: [Boost-bugs] [Boost C++ Libraries] #7159: Text-lines are processed as if they were preprocessing directives
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-22 18:19:45


#7159: Text-lines are processed as if they were preprocessing directives
-------------------------------------+--------------------------------------
 Reporter: tomasz.miasko@… | Owner: hkaiser
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: wave
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 Wave treats some text-lines as if they were preprocessing directives.
 This behaviour is trigger by following code, which is an example taken
 from C99 standard, with an additional newline:

 {{{
 #define EMPTY

 EMPTY # include <file.h>
 }}}


 {{{
 $ wave --c99 example.c
 example.c:3:7: error: could not find include file: file.h
 }}}

 Relevant part of C99 standard:
  A preprocessing directive consists of a sequence of preprocessing tokens
 that satisfies the following constraints: The first token in the sequence
 is a # preprocessing token that (at the start of translation phase 4) is
 either the first character in the source file (optionally after white
 space containing no new-line characters) or that follows white space
 containing at least one new-line character.

 It seems the same is true for other C/C++ standards, even if they do not
 specify that this conditions should occur at start of translation phase 4
 (http://www.open-std.org/jtc1/sc22/wg14/docs/rr/dr_144.html).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7159>
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:50:10 UTC