Using __restrict__ on a class member variable

Szabolcs Horvát szhorvat@gmail.com
Tue Apr 24 09:49:00 GMT 2007


Is it possible to use __restrict__ in C++ on a member variable, like
in the example below? (Does it have an effect on functions that take
arrays as arguments?)

class array {
    double * __restrict__ data;

...
...

};

The documentation only mentions using __restrict__ with function
arguments or member functions, and, if I understand correctly, it says
that __restrict__ will only have an effect on the function it was used
with.

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Restricted-Pointers.html#index-restricted-pointers-2455



More information about the Gcc-help mailing list