restrict - Wikipedia, the free encyclopedia

CentralNotice restrict From Wikipedia, the free encyclopedia Jump to: navigation , search This article is about the C programming language keyword. For other uses, see Restriction (disambiguation) . In the C programming language , as of the C99 standard , restrict is a keyword that can be used in pointer declarations. The restrict keyword is a declaration of intent given by the programmer to the compiler . It says that for the lifetime of the pointer, only it or a value directly derived from it (such as pointer + 1 ) will be used to access the object to which it points. This limits the effects of pointer aliasing , aiding optimizations. If the declaration of intent is not followed and the object is accessed by an independent pointer, this will result in undefined behavior . The use of the restrict keyword in C, in principle, allows non-obtuse C to achieve the same perf...

Linked on 2014-12-18 06:58:24 | Similar Links