Can compiler optimization introduce bugs?

后端 未结 22 1045
名媛妹妹
名媛妹妹 2020-11-27 13:23

Today I had a discussion with a friend of mine and we debated for a couple of hours about \"compiler optimization\".

I defended the point that sometimes

22条回答
  •  心在旅途
    2020-11-27 13:38

    I've never heard of or used a compiler whose directives could not alter the behaviour of a program. Generally this is a good thing, but it does require you to read the manual.

    AND I had a recent situation where a compiler directive 'removed' a bug. Of course, the bug is really still there but I have a temporary workaround until I fix the program properly.

提交回复
热议问题