May 2003
Intermediate to advanced
808 pages
32h 24m
English
register storage class — Register storage class specifier
storage-class-specifier := registerThe register storage class is
like auto: it can be used for local
objects and function parameters, and using it means that the declared
object has automatic lifetime. It also provides a hint to the compiler
that the object will be used frequently, so the compiler can optimize
access, perhaps by storing the object in a machine register.
Many modern compilers routinely ignore register because the compilers are better
than humans at allocating registers.
int foo(registerint parm) {registerint sqr = parm * parm; return sqr; }
auto, type, Chapter
2