[libcxx-commits] [libcxx] [libcxx] P2937R0: Freestanding: Remove strtok (PR #146290)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 29 12:56:38 PDT 2025


================
@@ -0,0 +1,14 @@
+// UNSUPPORTED: libcpp-has-no-cstring
+// REQUIRES: freestanding
+// XFAIL: *
+
+// RUN: %clang %s -c -o /dev/null -ffreestanding --std=c++20 2>&1 | FileCheck %s
+
+#include <cstring> 
+
+int main() {
+  char s[] = "hello world";
+  char* tok = std::strtok(s, " ");
+  (void)tok;
+  return 0;
+}
----------------
Zingam wrote:

```suggestion
}

```

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


More information about the libcxx-commits mailing list