3 ms·
When compiling a library, it is generally impossible for the compiler to know whether or not the pointers will be aliased, right? That decision is made after th
by bee_rider 2y ago
When compiling a library, it is generally impossible for the compiler to know whether or not the pointers will be aliased, right? That decision is made after the library is already compiled.
- drwu 2y agoThe function declaration in the header file of the library can carry the required 'restrict'. It works for c++ invokers too, as most c++ compilers also support and check the __restrict__ for old plain pointer types.