I have a function foo(unsigned __int128)
.
How can I pass a literal of type unsigned __int128
to the function?
My attempts:
foo(0xFFFFFFFFFFFFFF23FFFFF); //Truncated (expected)
foo(0xFFFFFFFFFFFFFFF01FFFu); //Truncated (expected)
foo(0xFFFFFFFFFFFFFFF23FFFFull); //Truncated
foo((unsigned __int128)0xFF45FFFFFFFFFFFFFFFFFull); //Truncated
As you can see, all of them are truncated.
How can I signal GCC, that an literal is an unsigned __int128
?
Edit: The gcc manual says:
There is no support in GCC for expressing an integer constant of type __int128 for targets with long long integer less than 128 bits wide
Does that mean, that I can't write literals of type (unsigned) __int128?
Are there alternatives?