[libc-commits] [libc] [libc] Use __attribute__((__nothrow__)) for __NOEXCEPT in C (PR #114653)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Dec 10 09:13:03 PST 2024
================
@@ -47,7 +47,14 @@
#define __restrict restrict // C99 and above support the restrict keyword.
#undef __NOEXCEPT
+#if defined(__has_attribute)
+#if __has_attribute(__nothrow__)
----------------
nickdesaulniers wrote:
Yikes, it seems clang didn't support C23/C++20 style function attributes in C until clang-17. That's still too soon for most users, so let's stick with the GNU C style function attribute then. https://godbolt.org/z/a39G76ffE
https://github.com/llvm/llvm-project/pull/114653
More information about the libc-commits
mailing list