Mar 1, 2017a consequence of this behavior is that when you add 10 to - 10u, the result is "one greater than the largest value that can be represented by the resulting type", so it gets truncated to zero.. 10u is an unsigned int. Iteration 10u invokes undefined behavior [-waggressive-loop-optimizations] 30:3:
With this makes for block style comments , without it for line style comments + -> (tested with idea 10u) May 23, 2017the expression 10u will yield type unsigned regardless of the size of unsigned, while the expression (uint16_t)n will yield unsigned value on platforms where int cannot represent all values 0. Jul 26, 2019how can i define a global constant in c?
In code.c #include "header.h" const u32 g_my_const= 10u;