mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-20 18:16:35 +00:00
Never remove or inline volatile variables (fixes #27)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
Variables in Millfork can belong to one of the following storage classes:
|
||||
|
||||
* static: all global variables; local variables declared with `static`
|
||||
* static: all global variables; local variables declared with `static` or `volatile`
|
||||
|
||||
* stack: local variables declared with `stack`
|
||||
|
||||
|
||||
+2
-1
@@ -43,7 +43,8 @@ Examples:
|
||||
|
||||
* `volatile` means that the variable is volatile.
|
||||
The optimizer shouldn't remove or reorder accesses to volatile variables.
|
||||
Volatile variables cannot be declared as `register` or `stack.
|
||||
Volatile variables (unline non-volatile ones) will not be removed or inlined by the optimizer.
|
||||
Volatile variables cannot be declared as `register` or `stack`.
|
||||
|
||||
* `<storage>` can be only specified for local variables. It can be either `stack`, `static`, `register` or nothing.
|
||||
`register` is only a hint for the optimizer.
|
||||
|
||||
Reference in New Issue
Block a user