Morgan Stanley CEO James Gorman said that China and the U.S. must come to a truce in its trade dispute because a full-blown trade war would be devastating for the global economy.

"We can't have a trade war," Gorman said in an interview Thursday with CNBC's Wilfred Frost. "It will have a devastating effect to the global economy. That doesn't mean there can't be changes to the way the trade agreements are being written."

Gorman, who said he has visited Chinese and U.S. officials recently, cautioned that there wasn't likely to be a tidy solution to the dispute after the upcoming G-20 meeting, in which President Trump and President Xi are scheduled to convene. The two countries account for more than 40% of the world's economic output, he pointed out.

"This is going to go on, these discussions, for a decade," Gorman said. "This is a resetting of a relationship with what is now the second largest economy in the world; China is a $12 trillion economy with all its trading powers."

Morgan Stanley is the sixth biggest U.S. bank by assets, but it has leading businesses in Wall Street arenas like equities trading and mergers advice and it also runs one of the biggest wealth management brokerages. Like its big-bank peers, the company will disclose whether the Federal Reserve will allow it to raise its dividend and share repurchase program on Thursday.

The bank's shares have climbed 9.4% this year.