Skip to content

Commit 7fbca4d

Browse files
authored
Alternative format specifier for %zd
Differential Revision: D79776266 Pull Request resolved: #13187
1 parent 2a692c2 commit 7fbca4d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

runtime/executor/method.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ Error Method::resolve_operator(
748748
if (!op_function.ok()) {
749749
ET_LOG(
750750
Error,
751-
"Missing operator: [%zd] %s",
751+
"Missing operator: [%" ET_PRIssize_t "] %s",
752752
static_cast<ssize_t>(op_index),
753753
operator_name);
754754
return op_function.error();

runtime/platform/compiler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@
149149
// As of G3 RJ-2024.3 toolchain, zu format specifier is not supported for Xtensa
150150
#if defined(__XTENSA__)
151151
#define ET_PRIsize_t "lu"
152+
#define ET_PRIssize_t "ld"
152153
#else
153154
#define ET_PRIsize_t "zu"
155+
#define ET_PRIssize_t "zd"
154156
#endif
155157

156158
// Whether the compiler supports GNU statement expressions.

0 commit comments

Comments
 (0)