Overview
| Artifact ID: | aeb58dfa5ead41275be136c2ca18c77cc0eabd8ddf8e180902735aa6f895b89b |
|---|---|
| Page Name: | branch/c11-restrict |
| Date: | 2025-11-21 14:45:02 |
| Original User: | dkf |
| Mimetype: | text/x-markdown |
| Parent: | 91084af19985d35c17f34a603128f3934577e643a422c513c0ddd650ea9a1bce (diff) |
Content
This is based on the much wider changes in the 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.