[libc-commits] [libc] [libc] Use __attribute__((__nothrow__)) for __NOEXCEPT in C (PR #114653)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Fri Dec 6 23:06:21 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__)
----------------
frobtech wrote:
I strongly disagree with your views on rules for public headers. I don't think there is community consensus for the policy you advocate here. Indeed, there is no clear community consensus at all on this subject yet. We should continue to address that as a community and reach consensus on a clear and documented policy. The current state of the header files in the source tree does not reflect any such policy, because there is none.
In the interests of moving forward incrementally I have made the conditionalization for `__NOEXCEPT` here consistent with existing conditionalization elsewhere in this file and other public header files. This existing de facto standard in the codebase is not entirely consistent with either the policy that you advocate or the one that I do. Until the aforementioned consensus on policy and documentation thereof is achieved, I think consistency with the existing usage elsewhere in the public headers should be the criterion for what we land now. The new version of this PR meets that criterion.
https://github.com/llvm/llvm-project/pull/114653
More information about the libc-commits
mailing list