S&P 500 ekes out gain as earnings worries loom The S&P 500 ended slightly higher on Tuesday as gains in tech-related shares offset fresh worries about the impact of the U.S.-China trade dispute on earnings.