<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/112122>112122</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Incorrect treatment of consecutive ## operators (compared with GCC).
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mrolle45
      </td>
    </tr>
</table>

<pre>
    When a macro definition has either 'a ## ## c', the result differs from GCC.  I'm not sure what the standard requires, though I suspect the answer is same as 'a ## c'.  It may depend on the order of evaluation of the ## operators.

Sample input
```
#define FOO(a, b, c) a ## b ## c, a ## ## c
FOO (x, , y)
FOO (x, 42, y)
```
Output from gcc -E is
```
xy, xy
x42y, xy
```
Output from clang -E is
```
xy, x ##y
x42y, x ##y
```
clang also emits an error about pasting 'x##'.  It's apparently trying to paste the 'x' to the second '##'.  Whereas GCC treats the '## ##' as being separated by a blank value and following the placeholder rules.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVE1z4zYM_TXUBROPBMuRdNBhm607OfnQw54hErLYUqTKj9j-9x3KSlMnne6MLQ4JvMdH4JEUgj5b5l4cfhGH7wWlODnfz94Zw_WhGJy69T8mtkAwk_QOFI_a6qidhYkCsI4TexDYEAjcC9y_D1JgI_AF4sTgOSQTQelxZB9g9G6G315edgCvApsZrIsQkme4TBRXRIhkFXkFnv9K2nO4U7l0nuAVQgoLy3sm2XBhDzpAoJmBwoOYrCJvE2GmGyhe2CpwdkU6r9iDG4HfyCRaz-TGNbSh3cKeovNhJ8rvovx2__5O82IYtF1S3Nafy-13n-J-LRPD8XQS2FIWP-SPFNjBP-KGf6l8ga8FXMmOpxMIbK85Jf9vAruvkRofY58UnVJcUrwX_iwlPP0KOvxn5vWWia63bVbjw_x_aKUhe_458Xa6z_yPy5-gd2oywQHPOgYgC-y980CDSxEWClHbc2789c7z3nWBTQBaFvJso7lB9LecGN2K4a3XGdXkxdV5LJ1VsLr3g-rHxJ4pZNdC9EwxvGMfmpZ5KMDAeZfAC3mKrGC4AcFgyP4J2WrZtApGZ4y7rHImhsWQ5MmZbEmfDD9arlD9XnX7jgruqwbbpnuuu7aY-rHG8ll1bffMrCoeKurkng9lJRvVDm1Z6B5LrKuy2peHqj60O2yaFtWohg67oeoOoi55Jm12xrzNO-fPhQ4hcV9VWCEWhgY2YX0fEC1fYI0KxPxc-D6DnoZ0DqIujQ4xfNBEHQ33r1Y679fLmss2s435kklnA8sU9dvXy5ZNLd2cm6bgouOUqy6w2xXJm36KcQli_03gUeDxrOOUhp10s8Bj3nobnhbv_mAZBR5XwUHgcTvRW49_BwAA__9VD3il">