Barcelona registered a maximum temperature of 40.7°C (105.3°F) on Wednesday, its highest figure in 112 years of records, weather agencies said as another heat wave struck Spain.