-preview=in might break code

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat Oct 3 12:27:02 UTC 2020


On Saturday, 3 October 2020 at 11:04:48 UTC, Timon Gehr wrote:
> No. UB means demons may fly out of your nose. It's not that. 
> You just get one of two behaviors, one is pass-by-reference, 
> the other is pass-by-value.

UB just means that it is left out of the language.
UB does not mean that implementors cannot specify what will 
happen.

That is a complete misunderstanding of the term.

The fact that Clang exploits UB to achieve higher performance in 
the optimizer is a deliberate choice they made. It is not a 
consequence of UB in the language spec per se. It is a 
consequence of deliberate optimization efforts.




More information about the Digitalmars-d mailing list