The 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. Exampleint foo(register int parm) { register int sqr = parm * parm; return sqr; } See Alsoauto, type, Chapter 2 |