MADRID -- Spain is considering a ban on sales of diesel and gasoline cars beginning in 2040 to counter climate change.