LONDON— BP PLC said Tuesday it would take a roughly $1.5 billion accounting charge for its latest quarter related to the U.S. tax overhaul, though it added that a corporate tax cut would be a long-term positive.

The charge, which won’t affect the oil company’s cash flow, highlights the wide-ranging impact of changes to the American tax code enacted by Congress and signed late last year by President Donald Trump. The accounting hit will be reflected in BP’s version of net earnings for the fourth quarter of 2017, when buoyant oil prices likely gave a big boost to profits..

BP said the tax bill will provide a long-term benefit in reducing the corporate tax rate it and other companies pay in the U.S. to 21% from 35%.

In the short term, BP said the tax changes would reduce the value of its deferred-tax assets. Companies can log such assets during unprofitable periods and use them as credits toward future tax payments. Lowering the overall corporate tax rate makes those assets worth less on paper.

Last week, Royal Dutch Shell PLC said the tax-change impact on its earnings will likely be a noncash hit of between $2 billion and $2.5 billion in the fourth quarter. Banks, including Barclays PLC and Credit Suisse Group AG have also warned of significant charges to their fourth-quarter results related to the new U.S. tax law.