Assignment <pointer to array of constants> = <pointer to array>: incompatible pointers
问题 When I compile something like this double da[ 3 ] = { 2., 3., 4. }; double (* pda)[ 3 ] = &da; double const (* cpda)[ 3 ] = pda; // gcc: warning; MSVC: ok gcc warns me warning: initialization from incompatible pointer type [enabled by default] Question: What's the problem with this assignment? Yes, technically, these are different types, but I don't see any danger here, double const (*)[ 3 ] looks even safer for me than double (*)[ 3 ] . I did some tests and results confuse me even more: 1)