Skip to content

Conversation

firewave
Copy link
Collaborator

No description provided.

Copy link

@chrchr-github
Copy link
Collaborator

What's the status of USE_BOOST_INT128? Maybe we should build it in the CI.

@firewave
Copy link
Collaborator Author

What's the status of USE_BOOST_INT128?

Getting quite close. ValueFlow::getSizeOf() needs to be sorted out. But the biggest blocker is arithmetic which is not supported by the type and I am not totally sure how to handle that. An intermediate solution I had in mind was to cast it to long long and give a debug message when it is out of range (I assume that will give some of the warnings we would also get if we enable -fsanitize=integer - and probably will spark controversy - again).

Maybe we should build it in the CI.

That's the plan when it fully builds.

@chrchr-github
Copy link
Collaborator

What's the status of USE_BOOST_INT128?

Getting quite close. ValueFlow::getSizeOf() needs to be sorted out. But the biggest blocker is arithmetic which is not supported by the type and I am not totally sure how to handle that.

Why would there be no arithmetic? This looks like at least the common operations are supported:
https://www.boost.org/doc/libs/1_87_0/libs/multiprecision/doc/html/boost_multiprecision/tut/ints/cpp_int.html

@firewave
Copy link
Collaborator Author

arithmetic which is not supported by the type

<<, ^, & et al. And then there's calls to math.h functions.

@chrchr-github chrchr-github merged commit 6e55812 into danmar:main Sep 20, 2025
61 checks passed
@firewave firewave deleted the int128 branch September 21, 2025 08:01
@firewave
Copy link
Collaborator Author

FYI

Using __int128 it already compiles and only lacks the string conversion of actual 128-bit values. I will prepare a PR so that can already be used.

Getting that much further uncovered issues with MathLib::calculate() and friends with unsigned values (i.e. greater than LLONG_MAX since it only provides signed results.

I will file appropriate tickets within the next days.

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.

2 participants