xiaoxiang781216 commented on a change in pull request #2222: URL: https://github.com/apache/incubator-nuttx/pull/2222#discussion_r517823474
########## File path: arch/sim/include/types.h ########## @@ -69,13 +69,41 @@ typedef unsigned char _uint8_t; typedef signed short _int16_t; typedef unsigned short _uint16_t; +#if defined(__INT32_TYPE__) +typedef __INT32_TYPE__ _int32_t; +#else typedef signed int _int32_t; +#endif + +#if defined(__UINT32_TYPE__) +typedef __UINT32_TYPE__ _uint32_t; +#else typedef unsigned int _uint32_t; +#endif +#if defined(__INT64_TYPE__) +typedef __INT64_TYPE__ _int64_t; +#else typedef signed long long _int64_t; +#endif + +#if defined(__UINT64_TYPE__) +typedef __UINT64_TYPE__ _uint64_t; +#else typedef unsigned long long _uint64_t; +#endif #define __INT64_DEFINED +#if defined(__INTMAX_TYPE__) +typedef __INTMAX_TYPE__ _intmax_t; +#define __INTMAX_DEFINED Review comment: how about we also typedef _intmax_t in __INTMAX_TYPE__ undefined case? ########## File path: arch/sim/include/types.h ########## @@ -69,13 +69,41 @@ typedef unsigned char _uint8_t; typedef signed short _int16_t; typedef unsigned short _uint16_t; +#if defined(__INT32_TYPE__) Review comment: should we apply the similar change to other arch? so we can decorate all printf/scanf like function with "format(...)" to catch the wrong type. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org