compiles with warnings then hangs