<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:cworth@cworth.org" title="Carl Worth <cworth@cworth.org>"> <span class="fn">Carl Worth</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED --- - GLSL preprocessor does not eat comments correctly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72686">bug 72686</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">URL</td>
           <td>
                
           </td>
           <td>http://patchwork.freedesktop.org/patch/19079/
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED --- - GLSL preprocessor does not eat comments correctly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72686#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED --- - GLSL preprocessor does not eat comments correctly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72686">bug 72686</a>
              from <span class="vcard"><a class="email" href="mailto:cworth@cworth.org" title="Carl Worth <cworth@cworth.org>"> <span class="fn">Carl Worth</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=72686#c4">comment #4</a>)

<span class="quote">> The above commit, which I believe is the fix you mentioned, causes this code
> to produce a preprocessor error:

> /*
> */  // a comment</span >
...
<span class="quote">> 0:2(60): preprocessor error: syntax error, unexpected $end

> This happens only if the /* */ contains newlines, and only if a single-line
> comment follows the multi-line comment. Two multi-line comments works fine.</span >

Yes, Petri, that's the commit I made to fix the originally-reported bug.

And thanks for finding this regression in my commit!

It's an extremely narrow problem, and you described it precisely. It can only
with a multi-line comment, (spanning more than one line), followed immediately
by a single-line comment without any intervening newline.

I've just sent a patch to the list to fix the bug, and also a patch that
adds a test case based on your description of the problem.

Thanks again! This was a ''fun'' problem to solve. (I was stumped for quite
a while. Then once I had a working fix in hand, went through three different
fixes as I realized that the descriptions I was writing for the fix didn't
match the precise symptoms of the bug. Each time, I had to look closer to
find that I was fixing some non-problem that only accidentally resolved the
real bug.)

It's nice to see in the final version that the fix, its description, and the
test case all match each other quite precisely.

-Carl</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>