// Does "int const *" refer to a constant pointer, or a constant integer? // The following shows what gcc thinks. // gcc 4 and clang 3 reject any of the lines below that are commented out. typedef const int * cip; typedef int const * icp; typedef int * const ipc; int xx(const int x){return x+3;} //int xy(const int x){return (++x)+3;} //int xy(int const x){return (++x)+3;} int xcipa(cip x){return *x+3;} int xcipb(cip x){return *(++x)+3;} //int xcipc(cip x){return ++(*x)+3;} int xicpa(icp x){return *x+3;} int xicpb(icp x){return *(++x)+3;} //int xicpc(icp x){return ++(*x)+3;} int xipca(ipc x){return *x+3;} //int xipcb(ipc x){return *(++x)+3;} int xipcc(ipc x){return ++(*x)+3;} // Thus 'const' refers to the thing on its left, if any. // Otherwise on its right.