What I\'m trying to do is to define a constant equal to 2^30 (I may change it to something like 2^34, so I prefer to have a room larger than 32 bits for it).
Why the
(uint64_t 1) is not valid syntax. When casting, you can either use uint64_t(1) or (uint64_t) 1. The commented out example works because it follows the proper syntax for casting, as would:
const uint64_t test = ((uint64_t)1) << 30;
Edit: While this directly answers the question, see the answer by Shafik Yaghmour on how to properly define an integral constant with specific size.