4 ms·
No one can ever prove such a thing. Neither can it be proven that gcc or any compiler for that matter produces error-free executables. What this does, however,
by stingraycharles 15y ago
No one can ever prove such a thing. Neither can it be proven that gcc or any compiler for that matter produces error-free executables. What this does, however, is providing information and analysis about the quality of the clang compilation process as compared to gcc.
- ars 15y agoNo can prove it, but at least the GCC version are actually run by people - these version and created, but never actually used. He should do some fuzz testing of these programs, with the exact same fuzz sent to the GCC versions, and then report any differences. But collecting the "results" would be hard - it's not always visible in output, you'd have to track system calls and IO.
- rbanffy 15y agoThe ideal scenario would be if upstream projects provided embedded test code with standardized hooks so that tests could be built, executed and results collected in an automated way. Even if we started with a small test set for some projects, it would be a huge win in the long run just to have this scaffolding in place. Any ideas on how to make a distro-agnostic testing hook?
- johnpaulett 15y agoIt does not necessarily have to be distro-agnostic. Debian packages can already hook the upstream's test suite (e.g. via dh_auto_test). From my (extremely limited and mostly dynamic language) Debian packaging experience, it seems that more often than not, packages do not use this existing hook. Not sure why that is though.
- aidenn0 15y agoAs an example, gcc generates nearly unusable code for a Via Isaiah in amd64 mode if you compile with -O1, and this has apparently been a known issue for at least 2 years.
- iso8859-1 15y agoIt can be proven, see CompCert C compiler: http://compcert.inria.fr/compcert-C.html http://compcert.inria.fr/compcert-C.html.
- stingraycharles 15y agoThat only proves that a compiler behaves according to a language definition. That does not prove the executables will behave as you expect the executables to behave, and thus there is no way knowing the executables will be error free.
- Dylan16807 15y agoFrownie said error-free compilation, not error-free in all possible aspects.