C `unaliased`
I am imagining a variadic function or macro called `unaliased`. At runtime it is allowed to do nothing or expand to nothing, so that a compiler is free to eliminate it or ignore it. But it is defined that calling it is equivalent to saying "within this scope, as of this call to `unaliased`, I promise that none of the arguments to this `unaliased` call are aliasing each other". More pedantically: if you call `unaliased` and any of the arguments to it are actually aliased, you get undefined behavior.
With such built-in functionality, I think you can:
Get even more optimizations than can be done by just going off the strict aliasing rule and `restrict`.
Get the same optimizations as from the strict aliasing rule, provided the code author used `unaliased` to indicate it was safe.
Get back functionality currently lost to the strict aliasing rule, or express that functionality more clearly and simply.












