Mondelez shares tumble after Buffett says Kraft Heinz isn't interested in buying it
Shares of Mondelez erased earlier gains Wednesday after investing legend Warren Buffett suggested Kraft Heinz isn't interested in buying the snack company.

Mondelez's stock was trading about 0.7 percent higher in the morning. It fell 3.1 percent after Buffett's remarks and was down 1.81 percent midday.

Buffett's Berkshire Hathaway is Kraft Heinz's largest shareholder, owning 26.7 percent of outstanding shares, according to FactSet.

Buffett was asked if Kraft Heinz would be interested in buying Mondelez on CNBC's "Squawk Alley."

"I think the answer is no on that," he said.

Analysts have been expecting Kraft Heinz to pursue another merger or acquisition after the company's failed hostile $143 billion takeover bid for Unilever earlier this year. Wall Street has speculated Mondelez could be a possible target. The company was once part of Kraft until it was spun off into a separate snack food company.

A Kraft Heinz takeover of Mondelez is one of the "most logical and likely" large-scale mergers and acquisitions in the food industry, RBC Capital's David Palmer wrote in a May research note. "We believe that Mondelez represents the best chance for Kraft Heinz to achieve global scale after the failed Unilever acquisition."

But Buffett suggested that buying Mondelez wouldn't help Kraft Heinz negotiate with retailers as they fend off the threat from Amazon and Whole Foods.

"That doesn't really help you that much in the fight," he said.

The size of the company selling a brand isn't as important to retailers as the strength of the specific brand, Buffett said. What grocers care about is whether products will sell.

Buffett quashed rumors that Kraft Heinz would go after a Unilever takeover again. He said the first attempt was a "misunderstanding."

"We will not make hostile takeover offers, and we did not intend that to be hostile," Buffett said. "But it turned out it was, and we immediately — the next day when I learned about it — we called it off. It was a misunderstanding."

— CNBC's Fred Imbert contributed to this report.