fix C++ compiler parameters size and shift amount calculation