Skip to content

Commit e73f1f6

Browse files
[NFC][SYCL] Don't use fprintf as deemed "unsafe" (#18275)
Some customers complained that having `fprintf` used in our library makes their security policy trigger an error.
1 parent 78672e4 commit e73f1f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ template <typename... Ts>
236236
void cannot_be_called_on_host([[maybe_unused]] const char *API,
237237
Ts &&.../* ignore */) {
238238
#ifndef __SYCL_DEVICE_ONLY__
239-
std::fprintf(stderr, "%s cannot be called on host!\n", API);
239+
std::cerr << API << " cannot be called on host!" << std::endl;
240240
std::abort();
241241
#endif
242242
}

0 commit comments

Comments
 (0)