We explore how the expulsion of gas from star-cluster forming cloud-cores due to supernova explosions affects the shape of the initial cluster mass function, that is, the mass function of star clusters when effects of gas expulsion are over. We demonstrate that if the radii of cluster-forming gas cores are roughly constant over the core mass range, as supported by observations, then more massive cores undergo slower gas expulsion. Therefore, for a given star formation efficiency, more massive cores retain a larger fraction of stars after gas expulsion. The initial cluster mass function may thus differ from the core mass function substantially, with the final shape depending on the star formation efficiency. A mass-independent star formation efficiency of about 20 per cent turns a power-law core mass function into a bell-shaped initial cluster mass function, while mass-independent efficiencies of order 40 per cent preserve the shape of the core mass function.