General Motors Corp said on Tuesday it would book a $39 billion non-cash charge in the third quarter related to deferred tax assets in the United States, Canada and Germany.

The company, which will report third-quarter results on Wednesday, said the valuation allowance partly reflects a three-year historical cumulative loss in North America and Germany and weakness at GMAC Financial Services.

The company also said it faces more challenging near-term automotive market conditions in the United States and Germany but sounded optimistic longer term, now that it has negotiated a deal with the United Auto Workers.

The establishment of a valuation allowance does not have any impact on cash, nor does such an allowance preclude us from using our loss carryforwards or other deferred tax assets in the future, said Fritz Henderson, GM vice chairman and chief financial officer.

It's also important to note that the establishment of a valuation allowance does not reflect a change in the company's view of its long-term automotive financial outlook, he added.

(Reporting by John Crawley in Washington and Peter Henderson)