Skip to content

Conversation

@DominikAdamski
Copy link
Contributor

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

Eliminate compilation error related to missing exception specification
'noexcept(true)' for at_quick_exit function in C++11.
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics labels Nov 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 7, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-backend-x86

Author: Dominik Adamski (DominikAdamski)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/166960.diff

1 Files Affected:

  • (modified) clang/lib/Headers/llvm_libc_wrappers/stdlib.h (+2-2)
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
 

@DominikAdamski DominikAdamski merged commit 67198d1 into llvm:main Nov 7, 2025
14 checks passed
vinay-deshmukh pushed a commit to vinay-deshmukh/llvm-project that referenced this pull request Nov 8, 2025
…vm#166960)

Eliminate compilation error related to missing exception specification
'noexcept(true)' for at_quick_exit function in C++11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:X86 clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants