Bernardo mis-interpreted the documentation.
Define "local memory" as memory from the current stack frame.
Define "non-local memory" as anything else (including stack memory from
another function, or a different instantiation of the current function).
Any function can read/write local memory (since that is not visible to
anyone outside the function).
A "const" function cannot read or write to non-local memory. There are
further constraints on not returning abnormally or not returning at all
that I'll not go into now.
A "pure" function can read non-local memory, but cannot write to it.
We use those conditions to determine if two invocations of a function
can be collapsed or moved or removed.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/