-
Notifications
You must be signed in to change notification settings - Fork 1.5k
added CMake option USE_INT128 and support built-in __int128 / some compilation fixes
#7840
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
base: main
Are you sure you want to change the base?
Conversation
|
See also #7833 (comment). Using |
cmake/compilerDefinitions.cmake
Outdated
| if(USE_INT128 AND USE_BOOST_INT128) | ||
| add_definitions(-DHAVE_BOOST_INT128) | ||
| endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the logic around USE_BOOST_INT128 is flawed . On is supposed to force the usage of Boost and Auto should provide a fallback to Boost if no built-in type exists but Boost is enabled (i.e. Visual Studio).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm.. how about:
VALUEFLOW_INT128=no
VALUEFLOW_INT128=gcc
VALUEFLOW_INT128=boost
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense to add Builtin and Boost as a configuration options and drop USE_BOOST_INT128 as a whole. That doesn't even require a deprecation since it is experimental and never fully worked.
9e1502e to
06d5a64
Compare
I filed https://trac.cppcheck.net/ticket/14154 about that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // TODO: requires check fails with GCC using __int128 | ||
| template<class T, REQUIRES("T must be an arithmetic type", std::is_arithmetic<T> )> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is fixed in GCC 16.
From https://gcc.gnu.org/gcc-16/changes.html#libstdcxx:
For targets that support [128-bit integers](https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html), std::is_integral<__int128> and similar traits are always true. Previously this was only the case when compiling with GNU dialects (-std=gnu++17, -std=gnu++14, etc.) and not with strict dialects (-std=c++17, etc.)
4aaa856 to
0cdb5c4
Compare
|



No description provided.