<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Different __LINE__ for different lines during macro expansion"
   href="https://llvm.org/bugs/show_bug.cgi?id=22973">bug 22973</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;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>jonathan.sauer@gmx.de
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Different __LINE__ for different lines during macro expansion"
   href="https://llvm.org/bugs/show_bug.cgi?id=22973#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Different __LINE__ for different lines during macro expansion"
   href="https://llvm.org/bugs/show_bug.cgi?id=22973">bug 22973</a>
              from <span class="vcard"><a class="email" href="mailto:jonathan.sauer@gmx.de" title="jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>
</span></b>
        <pre>The C11 standard only says (N1570 ยง6.10.8.1p1):

| __LINE__ - The presumed line number (within the current source file) of the
| current source line (an integer constant)

As the two invocations of the "inner" macro are originally on two different
lines, I'd say that clang is correct here. I also think that "presumed" leaves
preprocessor implementations a bit of leeway.

BTW: clang is not affected by the GCC bug you mentioned.

I'm closing this bug. Please feel free to reopen if you disagree.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>