<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112427>112427</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] mark internal definitions as nothrow
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
Forked from https://github.com/llvm/llvm-project/pull/112415.
Most of our internal declarations (example: headers under libc/src/) do not have the `gnu::nothrow` function attribute on the declarations or definitions. We should probably add them.
https://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/Function-Attributes.html
> most functions in the standard C library can be guaranteed not to throw an exception with the notable exceptions of qsort and bsearch that take function pointer arguments.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkz1zpDgQhn-NSLpMCQEGAoK585FdfHEj9YBuhMRKLX_8-y0Ye21vtgkfJbp59ehpTMkunmgU7V-ifSow8xri6K2-GUqYnbcUUzEH8zZOId7IwDWGDVbmPYn6ItQk1LRYXvNc6rAJNTn3_HF72GP4nzQLNe3ZOaGmqlJN1ZZCPgl5uV__DYkhXCHkCNYzRY8ODGmHEdkGn0Conl5x2x2J-gIroaGYIHtDEZydtVBTivqMMoAJ4APDis8EvBKIR7n4fEStLz7wGsOLeJRwzV4f3QGZo50zEwR_Fnz7dYhg6Gq9PV9LgP8I0hqyM7DHMOPs3gCNOQq3b7v6DZDW5eJzGeIi1BS8s55M0Om-9NCUbVnfn4WapvdoD5ePaKlceXNf24v6H9gOcB_7SGDv8ROjNxgN_H2wiRjfQKOHmWDJGNEzkTkJcYCTBqAHetW0nzheLK9nHx8YZ0efS-k4pB8pRAb0BuZEGPXxLTIw3ugT6R7OcwSMS97IcyoLM9ZmqAcsaKw6NUilGqWKdbxiX1ddVfVmQI1Ij40a5holymHQdd8XdlRSNZWsWiWlrLoScejb9jp3XT_oGpVoJG1oXXkIdwAubEqZxsM01RUOZ3Lp1FupuyzqED2Op6BzXpJopLOJ02cHtuzOkTgL2ifYMN6-yvnLCMAE71YVObrxj-fiDJveJ0N1xfOofgYAAP__9DUxxQ">