[libcxx-commits] [libcxx] [libc++] Suppress unsigned-integer-overflow warning in <charconv> (PR #225801)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 30 01:10:41 PDT 2026


================
@@ -323,7 +323,9 @@ template <template <typename> class Fn, typename... Ts>
 TEST_CONSTEXPR_CXX23 void
 run(type_list<Ts...>)
 {
-    int ls[sizeof...(Ts)] = {(Fn<Ts>{}(), 0)...};
+    // Avoid constant-folding the array initializer at compile time when Fn<Ts>{}() is constexpr.
----------------
philnik777 wrote:

I think this is an issue with this using an array initializer, which has to be constant initialized if it can. Using our usual `type_algorithms.h` stuff should fix the issue as well.

https://github.com/llvm/llvm-project/pull/225801


More information about the libcxx-commits mailing list