<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:Casey@Carter.net" title="Casey Carter <Casey@Carter.net>"> <span class="fn">Casey Carter</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - mesa defines likely/unlikely and these are C++20 keywords"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107439">bug 107439</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;">CC</td>
           <td>
                
           </td>
           <td>Casey@Carter.net
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - mesa defines likely/unlikely and these are C++20 keywords"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107439#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - mesa defines likely/unlikely and these are C++20 keywords"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107439">bug 107439</a>
              from <span class="vcard"><a class="email" href="mailto:Casey@Carter.net" title="Casey Carter <Casey@Carter.net>"> <span class="fn">Casey Carter</span></a>
</span></b>
        <pre>They're not technically keywords, they are "attribute-tokens". The problem is
that there is library wording in the Standard which forbids defining macros
with the same names as keywords, context-sensitive identifiers, and
attribute-tokens. C++17 [macro.names] para 2:

<span class="quote">> A translation unit shall not #define or #undef names lexically identical to keywords, to the identifiers listed in Table 4, or to the attribute-tokens described in [dcl.attr].</span >

When WG21 added "likely" and "unlikely" to [dcl.attr] in the C++20 working
draft, that made it implicitly forbidden to define them as macros. (Since The
change is a core language change the library groups never saw the proposal to
notice the problem.)

I've filed an issue with WG21 to change [macro.names]/2 to allow definitions of
"likely" and "unlikely" as function-like macros, which doesn't interfere with
use of the attributes [[likely]] and [[unlikely]] since there are no
parentheses to trigger expansion of a function-like macro. Assuming that the
rest of the Library Working Group agrees with me that we can't simply break
this much code for no good reason, you shouldn't need to change anything.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>