hartmannathan commented on PR #21214: URL: https://github.com/apache/nuttx/pull/21214#issuecomment-6531718220
Another reason to use the compiler check to define `HAVE_EXPRESSION_STATEMENT`: the compiler checking logic might get more complicated in the future. For example a future release of the Green Hills compiler might add support for statement expressions, or other compilers might need to be considered, such as SDCC, or even older versions of GCC or Clang. By decoupling the preprocessor logic that checks for compiler support from the preprocessor logic that controls div*_const(), the compiler checking logic could grow as complex as needed and its result (HAVE_EXPRESSION_STATEMENT) could be used in multiple places. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
