[libc-commits] [libc] [libc] Add printf error handling (with fixes #2) (PR #166517)
via libc-commits
libc-commits at lists.llvm.org
Wed Nov 5 08:50:44 PST 2025
================
@@ -83,13 +83,16 @@ TEST(LlvmLibcFPrintfTest, WriteToFile) {
written =
LIBC_NAMESPACE::fprintf(file, "Writing to a read only file should fail.");
EXPECT_LT(written, 0);
+#if !defined(__AMDGPU__) && !defined(__NVPTX__)
ASSERT_ERRNO_FAILURE();
+#endif
ASSERT_EQ(printf_test::fclose(file), 0);
}
#if !defined(LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS) && \
- !defined(LIBC_COPT_PRINTF_DISABLE_WRITE_INT)
+ !defined(LIBC_COPT_PRINTF_DISABLE_WRITE_INT) && !defined(__AMDGPU__) && \
----------------
lntue wrote:
use `LIBC_TARGET_ARCH_IS_GPU` from `src/__support/macros/properties/architectures.h`
https://github.com/llvm/llvm-project/pull/166517
More information about the libc-commits
mailing list