| Start | ||||||||
|---|---|---|---|---|---|---|---|---|
Unmodifiable (const) variables The During the execution of the other calls WarningVariables with But doing so is an error that leads to undefined behavior. The difficulty here is that this may behave as expected in simple examples as this, but then go wrong when the code grows. |
||||||||
| Volatile variables The The compiler will not optimize anything that has to do with the volatile variable. There are two main reasons to uses volatile variables:
Let's see this example: The compiler is allowed to notice the while loop does not modify the Declaring The same problem happens when accessing hardware, as we see in this example: The behavior of the optimizer is to read the variable's value once, there is no need to reread it, since the value will always be the same. So we end up with an infinite loop. To force the compiler to do what we want, we modify the declaration to: RemarksType qualifiers are the keywords which describe additional semantics about a type. They are an integral part of type signatures. They can appear both at the topmost level of a declaration (directly affecting the identifier) or at sub-levels (relevant to pointers only, affecting the pointed-to values):
The ordering of type qualifiers with respect to storage class specifiers ( Top-level qualificationsPointer subtype qualifications |
Read Article
https://develop.horje.com/learn/1434/reference