Replying to an earlier post

C/C++ compilers are non deterministic due to support of super macros that change run to run, non-deterministic optimisation strategies or ordering due to parallelism, and linkers often produce different outputs every time they are run where subtle bugs can cause crashes when addresses don’t line up how you expect. And that’s without mentioning projects that use a configuration step.

It’s actually a big problem in producing reproducible builds for security.

Replying to an earlier post

Yeah, but it does take a lot of work to coerce them to do it.

GCC is honestly obnoxious, and you have to do a bunch of unintuitive things to get it. The compile stage needs the built-in RNG seeded, parent file paths stripped, you need to ensure that the date/time macros are not used anywhere, and you need to ensure that all command line flags are passed in the exact same order every time.

I just went through this with GCC16 on a new project.

en