I would be surprised if any C compiler would drop an endless loop for any other reason than a compiler implementation bug. Can happen, endless loops are a bit tricky automatically test.
I don't think any compiler has a switch to make him remove endless loops, at least I never heard of such a thing, and I would not see why a compiler writer should add it.
C optimizers do normally only perform operations which do not alter the visible behavior, the side effects
(accesses to volatile objects, any change of state visible outside of the optimized code, ...).
I can imagine that some compiler optimize wait loop like "int i; for (i =0; i < 100; i++){}"
but even such loops are often maintained just to keep some code working (even when the compiler detects that they have no other effect than slowing things down).
So any special reasoning why compilers would (be allowed to) remove such loops?
Was anything specific mentioned in that review?
Daniel