A declaration can include type qualifiers to advise the compiler
about how the variable will be used. There are three different
qualifiers, const
, volatile
and restrict
. They
pertain to different issues, so you can use more than one together.
For instance, const volatile
describes a value that the
program is not allowed to change, but might have a different value
each time the program examines it. (This might perhaps be a special
hardware register, or part of shared memory.)
If you are just learning C, you can skip this chapter.
• const | Variables whose values don’t change. | |
• volatile | Variables whose values may be accessed or changed outside of the control of this program. | |
• restrict Pointers | Restricted pointers for code optimization. | |
• restrict Pointer Example | Example of how that works. |