https://github.com/DominikAdamski created 
https://github.com/llvm/llvm-project/pull/166960

Eliminate compilation error related to missing exception specification 
'noexcept(true)' for at_quick_exit function in C++11.

>From b322b9fa896b89f85199e3c4aaacb37084d9912e Mon Sep 17 00:00:00 2001
From: Dominik Adamski <[email protected]>
Date: Fri, 7 Nov 2025 09:14:22 -0600
Subject: [PATCH] [libc]  Fix wrapper headers for `at_quick_exit` on GLIBC for
 c++11

Eliminate compilation error related to missing exception specification
'noexcept(true)' for at_quick_exit function in C++11.
---
 clang/lib/Headers/llvm_libc_wrappers/stdlib.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Headers/llvm_libc_wrappers/stdlib.h 
b/clang/lib/Headers/llvm_libc_wrappers/stdlib.h
index 1da22abd0bc48..d79e7fa041ad4 100644
--- a/clang/lib/Headers/llvm_libc_wrappers/stdlib.h
+++ b/clang/lib/Headers/llvm_libc_wrappers/stdlib.h
@@ -34,13 +34,13 @@ _Static_assert(__builtin_offsetof(div_t, quot) == 0, "ABI 
mismatch!");
 _Static_assert(__builtin_offsetof(ldiv_t, quot) == 0, "ABI mismatch!");
 _Static_assert(__builtin_offsetof(lldiv_t, quot) == 0, "ABI mismatch!");
 
-#if defined(__GLIBC__) && __cplusplus >= 201703L
+#if defined(__GLIBC__) && __cplusplus >= 201103L
 #define at_quick_exit atexit
 #endif
 
 #include <llvm-libc-decls/stdlib.h>
 
-#if defined(__GLIBC__) && __cplusplus >= 201703L
+#if defined(__GLIBC__) && __cplusplus >= 201103L
 #undef at_quick_exit
 #endif
 

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to