Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent use of run-time floating point math functions for compile-time integer constants #252

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

blanktonio
Copy link

Not all compilers are smart enough to evaluate pow() function and cast the result to integer at compile time, which leads to unresolved dependencies on libm at link-time. Better use standard UINTxx_C() macros for explicitly define long integer constants, and bit-shifting operations as long as powers of 2 are considered.

@Thomas-Tsai Thomas-Tsai merged commit 7f00675 into Thomas-Tsai:master Oct 7, 2024
1 check passed
@blanktonio blanktonio deleted the progress_pow branch October 7, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants