Without the charges, Sun had earnings of $223.2 million, or 57 cents a share, up 24 percent from a year earlier.
Analysts had expected earnings of 94 cents a share, on average.
Sun reported earnings of $795 million, or 24 cents a share.
Analysts had expected the company to report earnings of 49 cents a share.
The company had been expected to report earnings of 73 cents a share.
That compared with earnings of $24.8 million, or 28 cents a share, a year earlier.
It had earnings of $29.3 million, or 9 cents a share, a year earlier.
The earnings of 23 cents a share were the same as in last year's third quarter.
In the period last year, the company reported earnings of 21 cents a share, or $361 million.
That compared with earnings of $68.7 million, or 26 cents a share, a year earlier.