3 ms·
This technique may work for simple pointers to integers but is very clumsy if you consider real world use cases where you have pointers to arrays of structures.
by exDM69 14y ago
This technique may work for simple pointers to integers but is very clumsy if you consider real world use cases where you have pointers to arrays of structures. There's no oneliner magic that tell the compiler that they don't alias.
So, no, this hack is not a replacement for "restrict" keyword in C99. If you use C99, use restrict. If you use C89, use __restrict or whatever your compiler provides you with.