1

I have a project where I use make to recompile only changed files and their dependedants. Sometimes I add -O0 to debug whereas most code is compiled with -O2 -march=native.

It's always the same compiler version. Is it possible to end up with two versions of code (e.g. one previously inlined elsewhere) or constants after linking?

sevo
  • 4,559
  • 1
  • 15
  • 31
  • Related: https://stackoverflow.com/questions/2722302/can-compiler-optimization-introduce-bugs – πάντα ῥεῖ Jan 26 '19 at 13:45
  • 1
    The elf abi of itanium c++ abi is independent of the optimization level. On the other some macros as `NDEBUG` could change the interface at object file level (even if it could be thought as a bug in the interface). – Oliv Jan 26 '19 at 17:26

0 Answers0