1. 11
  1.  

  2. 2

    I really like that there is a focus on making the decisions made by the compiler more visible. Sometimes it can feel like compilers are doing opaque magic.

    This, however, leaves me a bit speechless:

    In this new release of GCC, the switch statements can be translated to a linear function expression by the use of the -ftree-switch-conversion. This means that the compiler tries to find any linear function a * x + y that can apply to the given values on the switch.

    Wow!

    1. 2

      Unrelated to the content, but that first example for getcpu() looks wrong. It is passing uninitialized pointers to getcpu() and then casting those (still uninitialized) pointers to int pointers (which are not int) in the calls to printf().