[libc-commits] [libc] [libc] Add _Returns_twice to C++ code (PR #153602)
Petr Hosek via libc-commits
libc-commits at lists.llvm.org
Sat Aug 16 22:51:59 PDT 2025
================
@@ -47,6 +47,9 @@
#define __NOEXCEPT throw()
#endif
+#undef _Returns_twice
+#define _Returns_twice [[gnu::returns_twice]]
+
----------------
petrhosek wrote:
The `[[attribute]]` was only introduced in C20 so we shouldn't be using it in C code since we want to make sure our headers are compatible with older C standards.
https://github.com/llvm/llvm-project/pull/153602
More information about the libc-commits
mailing list