S&P 500 ekes out gain though profit worries weigh The S&P 500 ended slightly higher on Tuesday as gains in tech-related shares offset worries about a weakening outlook for earnings.