Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

mm, a non deterministic compiler with no way to verify correctness, what could go wrong lol


Ask C and C++ developers, they are used to it, and still plenty of critical software keeps being written with them.


Excellent point, undefined behavior is exactly like an LLM. Surely this is what “alignment” in the standard is talking about.


C and C++ compilers are deterministic and have guarantees of correctness similar to that of other languages (esp ones that share share the same llvm backend)


C++ compilers are not required to be deterministic and in practice are not, at least as far as "same source code produces same observable behavior". Things that can introduce non-determinism include the order in which symbols are linked, static variable initialization, floating point operations (unless you use strict mode, which is not mandated by the standard), and this is ignoring the obvious stuff like unspecified behavior which is specifically defined as behavior which can differ between different runs on the same system.

Also correctness guarantees? Hahaha... I'll pretend you didn't just claim C++ has correctness guarantees on par with other languages, LLVM or otherwise. C++ gives you next to nothing with respect to correctness guarantees.


Provided you're clever enough to avoid UB land mines, and compiler specific implementation non portable behaviours.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: