On the topic of (overly) aggressively optimising compilers:
http://blog.metaobject.com/2014/04/cc-osmartass.html
...and attempts at turning C into something a bit less programmer-hostile:
https://news.ycombinator.com/item?id=8233484
My point of view is that compilers should be optimising at the level of machine instructions, not by attempting to second-guess the programmer and remove code that it thinks invokes UB. I've looked at tons of compiler output over the years, and there's plenty of opportunity for optimisation in instruction selection and register allocation... C should be a "do what I say, not what I mean" type of language.