1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 03:16:45 +00:00

Never remove or inline volatile variables (fixes #27)

This commit is contained in:
Karol Stasiak
2020-01-03 21:28:10 +01:00
parent b9cdd0ffff
commit 6e36166af2
10 changed files with 34 additions and 20 deletions
+1 -1
View File
@@ -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
View File
@@ -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.