This C code is underlined in the IDE and gives me an error:
uint64_t dummy = 1<<50;
Also:
unsigned long long dummy = 1<<50;
The “<<” is underlined, and hovering shows “Shift count >= width of type”.
I noticed this because this was not working either:
printf("%" PRIu64 "\n, dummy);
and I thought to just manually print each bit for debugging.
I’ve just realized I need to #include <inttypes.h> - this resolves the printf problem, but the 1<<50 problem is still present.
No. That does not work because you are trying to shift a 32 bit int which gives you a … 32 bit int. Casting the result to 64 bit does not change its value. What you must do is 1ull<<50 because 1ull is a 64 bit int with value 1