[libc-commits] [libc] [libc] abs is a const function (PR #79650)
via libc-commits
libc-commits at lists.llvm.org
Fri Jan 26 13:41:14 PST 2024
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/79650
>From 45929684f5633b0ae33b3822409a74587018fcc0 Mon Sep 17 00:00:00 2001
From: Rose <83477269+AtariDreams at users.noreply.github.com>
Date: Fri, 26 Jan 2024 16:22:44 -0500
Subject: [PATCH] [libc] abs is a const function
---
libc/src/stdlib/abs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/stdlib/abs.h b/libc/src/stdlib/abs.h
index 19cef1446bd36df..0447f759b4bf1af 100644
--- a/libc/src/stdlib/abs.h
+++ b/libc/src/stdlib/abs.h
@@ -11,7 +11,7 @@
namespace LIBC_NAMESPACE {
-int abs(int n);
+[[gnu::const]] int abs(int n);
} // namespace LIBC_NAMESPACE
More information about the libc-commits
mailing list