I recently saw a case where clang generated incorrect code when a novice programmer used something like "for(d=0.0; d < 5.0; d++)", and d had the wrong value in the loop. Now, I would never use a double as a loop index, but I would rather see an error than wrong code. If all that is done to validate a compiler is to be sure it compiles things properly, this kind of problem won't be found until someone tries to use the software with incorrect code generation. That's not to say one wouldn't have the same issue moving from one release of gcc to another, just that any change in compilers can have unexpected consequences.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds