Boost C++ Libraries: Ticket #7159: Text-lines are processed as if they were preprocessing directives https://svn.boost.org/trac10/ticket/7159 <p> 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: </p> <pre class="wiki">#define EMPTY EMPTY # include &lt;file.h&gt; </pre><pre class="wiki">$ wave --c99 example.c example.c:3:7: error: could not find include file: file.h </pre><p> Relevant part of C99 standard: </p> <blockquote> <p> 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. </p> </blockquote> <p> 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 (<a class="ext-link" href="http://www.open-std.org/jtc1/sc22/wg14/docs/rr/dr_144.html"><span class="icon">​</span>http://www.open-std.org/jtc1/sc22/wg14/docs/rr/dr_144.html</a>). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7159 Trac 1.4.3 Hartmut Kaiser Sun, 22 Jul 2012 23:08:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7159#comment:1 https://svn.boost.org/trac10/ticket/7159#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/79684" title="Fixed #7159: Text-lines are processed as if they were preprocessing ...">[79684]</a>) Fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7159" title="#7159: Bugs: Text-lines are processed as if they were preprocessing directives (closed: fixed)">#7159</a>: Text-lines are processed as if they were preprocessing directives </p> Ticket