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

Use of UINT_MAX as maximum value for integers of type uint32_t #74

Closed
traversaro opened this issue Mar 1, 2018 · 0 comments · Fixed by #103
Closed

Use of UINT_MAX as maximum value for integers of type uint32_t #74

traversaro opened this issue Mar 1, 2018 · 0 comments · Fixed by #103

Comments

@traversaro
Copy link

In the time.cpp file, there are several points in which UINT_MAX is used as the maximum value for 32-bit unsigned integers (i.e. uint32_t):

While UINT_MAX is indeed the maximum value for 32-bit unsigned integers for the commonly used 64-bit data models (see http://www.unix.org/version2/whatsnew/lp64_wp.html , https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models ) there are a few platform for which it should be a more appropriate to use explicitly the 32-bit unsigned maximum, i.e. UINT32_MAX.

Unfortunately, I far as I understand UINT32_MAX is standard only since C++11, so I don't know a clean way to fix this using C++98 .

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 a pull request may close this issue.

1 participant