diff --git a/docs/en/migration-guides/release-5.x/5.0/gcc.rst b/docs/en/migration-guides/release-5.x/5.0/gcc.rst index bef17c2f44..c1f5f83ee0 100644 --- a/docs/en/migration-guides/release-5.x/5.0/gcc.rst +++ b/docs/en/migration-guides/release-5.x/5.0/gcc.rst @@ -114,7 +114,7 @@ The types ``int32_t`` and ``uint32_t`` have been changed from the previous ``int - (unsigned) long -The change mostly affects code that formats strings using types provided by ````. Users will need to replace placeholders such as ``%i`` and ``%x`` with ``PRIi32`` and ``PRIxx`` respectively. +The change mostly affects code that formats strings using types provided by ````. When using these fixed-width types (e.g., ``uint32_t``), users will need to replace placeholders such as ``%i`` and ``%x`` with ``PRIi32`` and ``PRIx32`` respectively. Types *not* defined in ```` (e.g., ``int``) do *not* need this special formatting. In other cases, it should be noted that enums have the ``int`` type. diff --git a/docs/zh_CN/migration-guides/release-5.x/5.0/gcc.rst b/docs/zh_CN/migration-guides/release-5.x/5.0/gcc.rst index c8e712d918..d6d7d1630c 100644 --- a/docs/zh_CN/migration-guides/release-5.x/5.0/gcc.rst +++ b/docs/zh_CN/migration-guides/release-5.x/5.0/gcc.rst @@ -114,7 +114,7 @@ Xtensa 编译器中的 ``int32_t`` 和 ``uint32_t`` - (unsigned) long -上述变化主要影响到使用 ```` 提供的类型来格式化字符串的代码。请使用 ``PRIi32``、``PRIxx`` 等占位符来分别替换 ``%i``、``%x`` 等。 +若代码中使用了 ```` 提供的类型来格式化字符串,则这些代码会受到上述变化的影响。使用这些宽度固定的类型(例如 ``uint32_t``)时,请使用 ``PRIi32``、``PRIx32`` 来分别替换 ``%i``、``%x`` 等占位符。**只有** 在 ```` 中定义的类型(例如 ``int``)需要这种特殊格式。 在其他情况下,请注意枚举支持 ``int`` 类型。