3 ms·
From the wiki: > In C, using the storage class register is a hint to the compiler to cache the variable in a processor register. Other than not allowing the re
by zbentley 8y ago
From the wiki:
> In C, using the storage class register is a hint to the compiler to cache the variable in a processor register. Other than not allowing the referencing operator (&) to be used on the variable or any of its subcomponents, the compiler is free to ignore the hint.
Doesn't sound like a garbage collector to me, by any stretch of the imagination.
- berti 8y agoThe register hint is a bit of a semi-unrelated sidetrack, which you would only ever use in a really hot location when proven necessary by profiling + inspection of the generated code, and the compiler is more often than not smarter than you anyway so it's rarely necessary. It's not relevant to GPs point about regular locals being stored on the stack. See https://en.wikipedia.org/wiki/C_syntax#Storage_class_specifiers https://en.wikipedia.org/wiki/C_syntax#Storage_class_specifi... for a better overview.