As AnomalousMonk wrote, such function attributes are GNU C extensions. But they can be considered de facto standard features on many platforms. Excerpt from gcc info's:
Many functions do not examine any values except their arguments,
and have no effects except the return value. Basically this is
just slightly more strict class than the `pure' attribute below,
since function is not allowed to read global memory....
Many functions have no effects except the return value and their
return value depends only on the parameters and/or global
variables. Such a function can be subject to common subexpression
elimination and loop optimization just as an arithmetic operator
would be. These functions should be declared with the attribute
`pure'. For example,
int square (int) __attribute__ ((pure));
says that the hypothetical function `square' is safe to call fewer
times than the program says....
Note that in many cases, the compiler can discover those attributes on its own (and even offer suggestions to the programmer via warnings.)
ps. Take care not to confuse type qualifier const with attribute((const))