Gary-Hobson commented on code in PR #7688: URL: https://github.com/apache/incubator-nuttx/pull/7688#discussion_r1031745787
########## include/nuttx/streams.h: ########## @@ -40,6 +40,16 @@ * Pre-processor Definitions ****************************************************************************/ +#define stream_write(stream, buf, len) \ Review Comment: #define lib_stream_puts(stream, buf, len) \ _**(FAR struct lib_outstream_s *)**_(stream)->puts((FAR struct lib_outstream_s *)(stream), buf, len) I have a little doubt about this code, which variable does it decorate (FAR struct lib_outstream_s *) Does this lead to different results if the precedence of "->" and "()" is not the same in C and C++, as deduced by operator precedence. 这段代码我有一点疑问, (FAR struct lib_outstream_s *) 这个类型转换修饰是那一个变量呢? 如果按照运算符优先级进行推导,在 C 和 C++ 中 “->” 和 “()” 的优先级并不相同,这是否会导致不同的结果。 https://en.cppreference.com/w/c/language/cast https://en.cppreference.com/w/cpp/language/operator_precedence https://en.cppreference.com/w/c/language/operator_precedence -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org