You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/11/01 22:11:21 UTC

[incubator-nuttx] branch master updated: arch/arm: Document the clever trick of PRI?32 macros

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 12926ee864 arch/arm: Document the clever trick of PRI?32 macros
12926ee864 is described below

commit 12926ee864f0be54201b6ae6c778a61162f77003
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Nov 1 17:39:30 2022 +0800

    arch/arm: Document the clever trick of PRI?32 macros
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/arm/include/inttypes.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/inttypes.h b/arch/arm/include/inttypes.h
index 88500bb22c..ebae732acd 100644
--- a/arch/arm/include/inttypes.h
+++ b/arch/arm/include/inttypes.h
@@ -29,8 +29,12 @@
  * Pre-processor Prototypes
  ****************************************************************************/
 
+/* The below definition convert __INT32_TYPE__ from 'int'/'signed int' or
+ * 'long int'/signed long int' to '+2'/'+0 +2' or '+4 +2'/'+0 +4 +2', and
+ * then make the expression of '__INT32_TYPE__ == int' valid.
+ */
+
 #define signed      +0
-#define unsigned    +0
 #define int         +2
 #define long        +4