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

    <tr>
        <th>Summary</th>
        <td>
            __builtin_classify_type (0uwb)
        </td>
    </tr>

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

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

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

<pre>
    GCC 14 added code 18 for _BitInt types (signed or unsigned) from __builtin_classify_type, while clang returns -1.  The new code
would be better so that one can distinguish _BitInt types in C macros from other integral types.

Note, GCC 14 also extended the builtin, so that it either accepts (unfortunately for historical reasons promoted) expression,
but also a type, in which case it can get also return values for unpromoted types.  E.g.
__builtin_classify_type (typeof (expr)) or __builtin_classify_type (int).  In C++ one can use templates, but in C _Generic only allows
distinguishing stuff for known types, but in case of _BitInt types can only do so for a particular width and not for say all unsigned _BitInts of any width.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U82O4ygQfhp8KbVlk6QTH3yYZDajuexp71EZyjbdBCwoJpO3X4GT2VZLvRcbCer7BYzRTI6oF7uj2H2vMPHsQ_-G72l4I2scvVeD1_f-x-kE7RZQa9KgvCZoDzD6AJej4Z-Oge8LRRDyUAA1-ADJrWshOxiDv8LlMiRj2biLspl5vF_ymJAnuM3GEiiLboJAnIKL8NLWAP_MBI5uhVM030Xz7eaT1TAQDMRMAaIHnpHBOwKFDrSJbNyUTJw_qTMOTnBFFXxcBXmeKYBxTFNAu56qV5b1-7fnIu9p30YP9JvJ5Rh4JngYymeeOgwDmQKMStHCJZXkRh84OWSy9xLcbCL7YBRaCITRuwhL8FfPa2D0ewkUo_EZexUzJF4VIDxjMy4np2ZQGCkz5wAmepxbg4RfaBPFQprck-NhFuCvenpY_qKeLD___ZhXWZeQXZaY2_96xDgWsqsBfjo4CXkU8vinohQJmK6LRaaYfWRrpZ3LD3IUjALv7B3QWn-Lq7oPtRo3QeQ0jsXTu_M3t9r5AFUC8eOnG5DJC7L2ua88jrBgYKOSxQA3o3kGdBqc57Idscj4c5mfgDGDo7uvI3Wl-43uNh1W1LevXffaHJrXbTX3hx023SD10KjDiI3cdyTltt3v9uOhbVFWppeN3LRt2zSdbJttvTt0LW0GVLvN0Axai21DVzS2tvbXtfZhqkyMifp927VtZXEgG8v7lTI_lLIppMzPOfR55mVIUxTbxprI8T8UNmyp_58Gm3QbhOyqFGw_My9RbL4JeRbyPBme01ArfxXynAEfv5cl-DdSLOS5yIhCnovMfwMAAP__XaiAJA">