Listing 1: Invalid references to identifiers declared later

void ex1()
{
  // y and MyInt are not declared
  // so next line is wrong
  int x = (MyInt) y;
  typedef int MyInt;
  float y = 0.0;

  float a;
  // b and MyFloat are not declared
  // yet, so next line is wrong
  a = (MyFloat) b;
  typedef float MyFloat;
  int b = 0;
}