error with adc.h

all of a sudden when i compile now i get this error:

C:\mcc18\h\adc.h:160:Error: syntax error

witch goes to this line in the code:

-> union ADCResult
{
int lr; // 2 bytes as a long
char br[2]; // 2 bytes as 2 chars
};

what should be done to correct this error?

This seems correct…
You probably left something out earlier in the code.
Most likely the line of code that is immediately before it… but it depends on the error.

Which .c file is it compiling when you get this error?

I am guessing that it must be main.c, user_routines.c, or user_routines_fast.c. because:

  1. In adc.h, the line you indicated is the first line that is neither a comment line, a blank line nor a preprocessor directive.
  2. adc.h is #included first in only in ifi_aliases.h, which is in turn #included first in only these three .c files.

I predict that there is some unintelligible garbage somewhere before the #include “ifi_aliases.h” in whichever one of these files is producing the error message. I further predict that the garbage is right at the beginning of the file. (Probably the result of some unintended keystrokes made sometime when the file/project was first opened.)

Good luck!