Stocks briefly added to gains on Thursday after pending sales of existing U.S. homes unexpectedly rose in June from May.

The Dow Jones industrial average was up 7.95 points, or 0.06 percent, at 12,310.50. The Standard & Poor's 500 Index was up 0.94 points, or 0.07 percent, at 1,305.83. The Nasdaq Composite Index was up 6.13 points, or 0.22 percent, at 2,770.92.