Differences between discontinuous and continuous soft-core attractive potentials: The appearance of density anomaly