Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
335 views
in Technique[技术] by (71.8m points)

gcc/g++的优化让程序无法运行?

我实现了一个基于D*-Lite的路径规划算法。

  • 当我没有开启优化时(-O0),程序可以正常运行。但是当我开启优化等级时(-O1/2/3)会导致程序无法终止。
  • 在Visual Studio中,无论是debug模式还是release模式都可以正常运行。

在以上情况中,代码均相同。有没有大佬指点一下,不知道怎么下手解决这个问题。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...