Sun Studio 12: C User's Guide

D.1.2 C99 Keywords

6.4.1 Keywords

The C99 standard introduces the following new keywords. The compiler issues a warning if you use these keywords as identifiers while compiling with -xc99=none. Without -xc99=none the compiler issues a warning or error messages for use of these keywords as identifiers depending on the context.

D.1.2.1 Using the restrict Keyword

An object that is accessed through a restrict qualified pointer requires that all accesses to that object use, directly or indirectly, the value of that particular restrict qualified pointer. Any access to the object through any other means may result in undefined behavior. The intended use of the restrict qualifier is to allow the compiler to make assumptions that promote optimizations.

See 3.8.2 Restricted Pointers for examples and an explanation on how to use the restrict qualifier effectively.