I was looking at C99 specification (N1256.pdf) which says on (p.11506):
const int *ptr_to_constant;
int *const constant_ptr;
"The contents of any object pointed to by ptr_to_constant shall not be modified through that pointer, but ptr_to_constant itself may be changed to point to another object. Similarly, the contents of the int pointed to by constant_ptr may be modified, but constant_ptr itself shall always point to the same location." (6.7.5.1 Pointer declarators)
Now from what I read earlier the following two statements give rise to identical behavior.
int *const constant_ptr; /* This form is mentioned in the standard */
int const *constant_ptr; /* This form is NOT mentioned in the standard */
I was wondering if the second form is correct or just an extension.
Thanks in advance, -S