4.8. Hints
4.8 Hints
- The extent to which suggestions made by using the
register
storage-class specifier are effective (C90 6.5.1, C99 and C11 6.7.1).The
register
specifier affects code generation only in these ways:- When used as part of the register variable extension, see Explicit Reg Vars.
- When
-O0
is in use, the compiler allocates distinct stack memory for all variables that do not have theregister
storage-class specifier; ifregister
is specified, the variable may have a shorter lifespan than the code would indicate and may never be placed in memory. - On some rare x86 targets,
setjmp
doesn't save the registers in all circumstances. In those cases, GCC doesn't allocate any variables in registers unless they are markedregister
.