Such a facility can have other uses, particularly for static analysis,
by allowing simple preconditions and postconditions to be specified.
For example:
* a returned pointer is guaranteed to be non-null.
* a supplied pointer is always dereferenced.
* a supplied pointer must be dereferenceable on input, and that pointer
is no longer dereferenceable after return, e.g. free().
Of course, there's a tradeoff between implementation complexity and
features, as always. While these facilities might help the optimizer,
the compiler could also issue warnings if it detects that a precondition
must be violated (and this can also be used to check the correctness
of any user-supplied annotations).