Possible Duplicate:
“register” keyword in C?
What if I declare almost everything as register variables? This will speed up my program yes? Or is there some sort of drawback. Cause I’m having a hard time picking with ones to declare as register variables.
You can’t take addresses of register variables.
Apart from that, compilers are good at register allocation, and you pretty much never want to declare variables as register yourself (compilers are free to ignore the hint — I would not be surprised if major compilers pretend that
registerdoes nothing, except perhaps when told not to optimize the code).