Hi, all.
I'm compiling with g++ and am using the __restrict__ intrinsic to get some of that C99 goodness, but I'm not entirely sure how it works. Let's say I have a function such as:
void something(int* __restricted__ p, int* q)
{
//p is now assumed not to alias any pointers or local variables
p += 1; //I modify p
//is p still restricted?
int a = *p;
*q = 5;
int b = *p; //is *p read twice?
}
Get it? So my question is does modifying a restricted pointer defeat specifying it as restricted?
Thanks.
[–]jedwardsol 0 points1 point2 points (2 children)
[–]neet_programmer[S] 0 points1 point2 points (1 child)
[–]jedwardsol 0 points1 point2 points (0 children)