__restrict pointer aliasing with only one pointer

Viewed 621

Is there any advantage to specifying the MSVC/GCC non-standard __restrict qualifier on a function pointer parameter if it is the only pointer parameter? For example,

int longCalculation(int a, int* __restrict b)

My guess is it should allow better optimization since it implies b does not point to a, but all examples I've seen __restrict two pointers to indicate no aliasing between them.

1 Answers
Related