1. 10
  1.  

  2. 2
    1. There are scoping blocks where you can tell the compiler not to optimize things. e.g. #pragma optimize or function attributes
    2. This code is Too Clever By Half(TM) but sometimes you need it
    3. You can get this kind of thing even without optimizations - I forget the details now, but I once had to dig through some code for running an experiment that was originally written for PowerPC macs and was now being run on Intel macs and there was a Too Clever By Half(TM) bit that, it turned out, only worked properly on PowerPC.
    1. 2
      1. There are scoping blocks where you can tell the compiler not to optimize things. e.g. #pragma optimize or function attributes

      Though note that as of 7.1, GCC’s documentation describes __attribute__((optimize(...))) as “[to] be used for debugging purposes only…not suitable in production code” (and given that the corresponding pragma is described in terms of the attribute, the same would presumably apply to it as well).