[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 11:22:26 PST 2025
================
@@ -83,16 +83,14 @@ 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(__AMDGPU__) && \
- !defined(__NVPTX__)
+ !defined(LIBC_COPT_PRINTF_DISABLE_WRITE_INT) && \
+ !defined(LIBC_TARGET_ARCH_IS_GPU)
----------------
lntue wrote:
Include "src/__support/macros/properties/architectures.h".
https://github.com/llvm/llvm-project/pull/166517
More information about the libc-commits
mailing list