4 ms·
Compiler optimizations by themselves do not cause bugs - they reveal bugs. This is incorrect. Optimizations do often reveal bugs rather than causing them, but
by julian37 15y ago
Compiler optimizations by themselves do not cause bugs - they reveal bugs.
This is incorrect. Optimizations do often reveal bugs rather than causing them, but turning on optimizations can also cause bugs in itself. See for example:
http://gcc.gnu.org/bugzilla/buglist.cgi?short_desc=optimization%20bug&resolution=---&resolution=FIXED&cf_known_to_fail_type=allwords&cf_known_to_work_type=allwords&query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=SUSPENDED&bug_status=WAITING&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&short_desc_type=allwordssubstr&product=gcc http://gcc.gnu.org/bugzilla/buglist.cgi?short_desc=optimizat...
- sharpneli 15y agoThese are due to bugs in the compiler, not inherent property of optimizations. It's quire rare for anyone to hit a optimizer bug and when it happens one can always selectively disable the buggy optimization method. Disabling all optimizations kinda overdoes it.
- hiidiot 15y agoFeel free to differentiate between bug types for an audience which has purchased your software. I am sure they'll be fascinated by your explanations.