arnavsharma990 commented on PR #20996: URL: https://github.com/apache/nuttx/pull/20996#issuecomment-6556759184
Hi @yf13 — I reviewed #20996 after receiving feedback on #21214. Our changes overlap significantly in `math32.h`/`compiler.h`, but #21214 takes a different approach to two issues raised during the review: 1. **File-scope initializers** — Statement expressions cannot be used in file-scope constant initializers, affecting board automount configurations using `MSEC2TICK()`. #21214 addresses this by converting `div64_const` into a `static inline_function`, avoiding the need for `MSEC2TICK32` or board-specific edits. 2. **Type promotion** — The conditional operator (`?:`) can promote 32-bit dividend results to `uint64_t`, breaking existing format-string expectations. #21214 uses `__builtin_choose_expr` to preserve the selected branch's type. Would you be open to integrating these approaches into #20996 while retaining your `DEBUG_FULLOPT` and architecture gating? This would give us one consistent policy for enabling the optimization, while potentially retaining #21214's `CONFIG_LIBC_DISABLE_DIV64_OPTIMIZATION` opt-out. I'm happy to port and test the changes, including the size-sensitive configurations flagged by @casaroli. If we consolidate, I'll close #21214 to avoid parallel changes to the same macros. -- 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]
