.
D 2025-11-21T14:45:02.391
L branch/c11-restrict
N text/x-markdown
P 91084af19985d35c17f34a603128f3934577e643a422c513c0ddd650ea9a1bce
U dkf
W 726
This is based on the much wider changes in the [`c-std-update`](https://core.tcl-lang.org/tcl/timeline?r=c-std-update) branch. Or would be except those never touched `restrict`.
For the most part, it's `OUT` (or `IN/OUT`) parameters (or technically pointers to them) that are marked as `restrict` because we _really_ assume they don't alias nastily. A number of functions in our public API ought to also be so marked on an appropriate argument, especially `Tcl_GetWideIntFromObj()` and so on; it's typically pretty obvious what ought to have the treatment. If we were doing it _properly,_ almost every instance of a `Tcl_Interp*` argument would be `restrict`, but the usual TBAA rules of modern compilers are good enough.
Z 559b25c6050492afb9d71dcc0cf21e15