ARM: move #ifdef to match the error handling code