EXHIBIT 23.1 CONSENT OF ERNST & YOUNG LLP We consent to the incorporation by reference in the Registration Statement (Form S-8 No. 33-9931) pertaining to the Sunoco, Inc. Capital Accumulation Plan of our report dated June 14, 2000 with respect to the financial statements and supplemental schedule of the Sunoco, Inc. Capital Accumulation Plan included in this Form 10-K/A for the year ended December 31, 1999. /s/ ERNST & YOUNG LLP - --------------------- Ernst & Young LLP Philadelphia, Pennsylvania June 26, 2000