On 7/30/14, 5:29 PM, Andrei Alexandrescu wrote:
On 7/30/14, 4:51 PM, Tobias Müller wrote:
With relatively 'dumb' compilers, this is not a big problem, but
optimizers
are more and more clever and will take profit of such assumptions if they
can.

That's true, and it seems like a growing trend. Relevant threads:

https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/9S5jNRW-5wY


http://www.spinics.net/lists/gcchelp/msg41714.html

Recent versions of gcc and clang have become increasingly aggressive
about optimizing code by taking advantage of making undefined behavior
_really_ undefined. There's been a couple of posts in the news recently
that I can't find at the moment.

I think I found it: http://www.redfelineninja.org.uk/daniel/?p=307

Andreu

Reply via email to