Your #define statements are wrong. #define run_sw RA1; defines run_sw as RA1; (*with* the semicolon) whereas presumably you want it defined just as RA1. #define statements are not terminated with a semicolon but with an end of line (hence the need to put a \ at the end of each line of a multi-line #define).
So
Code:
if (run_sw == 0) goto start_up;
will be translated as
Code:
if (RA1; == 0) goto start_up;
which is incorrect syntax and the errors are pretty much what I'd expect to see from any compiler. This doesn't explain why the compiler appears to compile the program successfully a second time though. A compiler bug perhaps? But it's anyone's guess what code it's producing.