[libc-commits] [libc] [libc] abs is a const function (PR #79650)

Schrodinger ZHU Yifan via libc-commits libc-commits at lists.llvm.org
Fri Jan 26 13:30:42 PST 2024


================
@@ -11,7 +11,7 @@
 
 namespace LIBC_NAMESPACE {
 
-int abs(int n);
+__attribute__((__const__)) int abs(int n);
----------------
SchrodingerZhu wrote:

`[[gnu::const]]`

https://github.com/llvm/llvm-project/pull/79650


More information about the libc-commits mailing list