4 ms·
I'm not sure it's as rare as you make it out to be - AFAIK most compilers that support restrict declare malloc() and new to return restrict pointers, so in
by AshleysBrain 15y ago
I'm not sure it's as rare as you make it out to be - AFAIK most compilers that support restrict declare malloc() and new to return restrict pointers, so
int *x = malloc(100), *y = malloc(100);
followed by some loop should be able to spot that x and y are not aliased. It should also be able to propagate the restrict as pointers are passed around, at least to some extent.
- lukesandberg 15y agowould the c compiler actually pull that restrict annotation forward without declaring the locals as restrict?