[llvm-dev] Function Inlining and undef / poison question
John Regehr via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 15 17:16:53 PDT 2017
> I understand that is the "letter of the law". However, I can see the
> argument for something that behaves in a predictable way, whether for
> example F is defined in a header file or in a separate translation unit
> - and I believe the example here is one where that would make a
> difference - even if the compller is perfectly fine to produce something
> that plays the theme tune to Mony Python's Flying Circus or prints 42 on
> the screen, instead of whatever "do_stuff" does.
This ship has sailed.
If you want predictability for UB you'll need to get it through a
sanitizer, a non-optimizing compiler, a special-purpose command-line
flag that disables a class of UB-exploiting optimizations, etc.
More information about the llvm-dev