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

    <tr>
        <th>Summary</th>
        <td>
            Consider defining NULL as expanding to nullptr in C2x and later
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            c2x,
            clang:headers
      </td>
    </tr>

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

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

<pre>
    WG14 adopted https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3042.htm into C2x, so `nullptr` is a new kind of null pointer constant available in C. `NULL` is defined as expanding to the implementation-defined null pointer constant (7.19p3). It's worth thinking about whether we want to change the definition of what `NULL` expands to so that users get some extra safety around accidental implicit conversions.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUk1vnDwQ_jXmMloEBpZw4JBsxKtXinqreh7sWXBibGQPYfPvK5ON2qo92bJnno-ZB2M0kyPqRfMkmucMN5596B8xePeE1i7ostHrj_7Hf2UNqP3KpGFmXqOoHoUchBz2fc_9Su4UWec-TEIOr6xKIYeopEwFU1l_1gk5aK-ikIOrilrmMy9gHHu4yJuQF4gexLlwm7UrB3EuwERAcLTDm3Ea_BXSH6zeOKYAyrvI6BjwHY3F0RIYB5c8gXz7_vJyR9B0NY40YAS6rei0cROwB54JzLJaWsgxsvHu9FX6bxohH9q87NZKyC6H_1nINsLuA8_As3FvCRdHvzHsM_FMAXaCPXWyBzWjm-ggPVhMIkyW9hn5d8WfGmPqiUkkMmyRQoSJGKJfCOjGASHilfgDMPjNaUCljE4-7OHJKMNJ-DuFaLyLeab7SndVhxn15bmtm3NXNU029-OVHnT70Nadxvra1VWldVGprmsb0hWNmellIauilHVZF13Z5C11pFpqNY2jKq-VqAta0Njc2vclJSAzMW7UnwvZtJnFkWw8AiYluRmdOgYuUjYuQkqVdv91t-gmUT3OhJpCTO_Ncxb6hHwatymKurAmcvzFxYYt9RfvotEU7rN1E6Rx_rXye7SOmMgboNNgkSlkW7D9n7GeDM_bmCu_CDkktvtxWoN_JcVCDofNlObD6c8AAAD__6YsGV0">