Hey, maybe I'm wrong, but I believe turning on absolutely all warnings in a compiler is probably not something you want.
I absolutely agree! That was just to ensure we don't accidentally leave out any warning option related to an implicit type conversion.


By focusing on this assembly instruction, I wanted to emphasize that the compiler is perfectly capable of detecting the number of bits required to represent a given value, provided the value is known at compile time. So the compiler knows that value 30 fits well into 32 bits and has opted for the slightly cheaper 32-bit copy operation, although we have tried to supply a 64-bit value to the 64-bit parameter in C code.


I know this answers your question about the type overflow only indirectly. Perhaps a better answer is that you find the value 30 as a literal value in the related instructions (lines 19 and 41 of the ASM code). It's not that the value is first saved in a 64-bit register and later copied into 32-bit registers using a kind of narrowing operation. This would be a waste of ressources.


Just to prove that the compiler detects the size that a value occupies, update line 5 in the C code:
#define NAME_LENGTH ((size_t)0xffffffffffffffffULL)
Now you get the desired warning. (Besides of instantly running out of memory of course.)