S&P 500 Record Contrasts With Greater Caution on Earnings