These error messages come from the pre-processing pass of the compiler. Athough the compiler and pre-processor are integrated into the same executable, it is worth distinguishing the pre-processor error messages from those generated by the compiler proper.

# is not followed by a macro parameter

The # concatenation operator must be followed by a macro parameter name.

## occurs at border of replacement

The ## operator cannot be placed at the end of a line.

#defined token is not a name

The token defined immediately after #define is not a valid pre-processor identifier.

#defined token 'token' can't be redefined

You cannot redefine a number of standard tokens such as __LINE__ and __STDC__. The token you're trying to redefine is one of these.

bad ?: in #if/#elif

There is an error parsing the ternary ?: operator in an expression. This is usually caused by mismatched parentheses or forgetting one of the ? or : separators.

bad operator 'operator' in #if/#elif

The operator operator is not allowed in pre-processor expressions.

bad syntax for 'defined'

The defined standard pre-processor function does not conform to the syntax defined(name).

can't find include file 'file'

The include file file can't be found in any of the directories specified in compilation.

disagreement in number of macro arguments to 'name'

The macro name has been invoked with either too few or too many actual arguments according to its formal argument list.

duplicate macro argument 'name'

The macro argument name has been given twice in the argument list of a #define pre-processor control.

end of file in macro argument list

The pre-processor encountered the end of file whilst processing the argument list of a macro.

illegal operator * or & in #if/#elif

The pointer dereference operator * and the address-of operator & cannot be used in pre-processor expressions.

insufficient memory

The pre-processor has run out of memory. This is a very unlikely error message, but if it does occur you should split up the file you are trying to compile into several smaller files.

macro redefinition of 'name'

The macro name has been defined twice with two different definitions. This usually occurs when two header files are included into a C source file and macros in the header files clash.

pre-processor internal error: cause

The pre-processor has found an internal inconsistency in its data structures. It would help us if you could submit a bug report and supporting files which demonstrate the error.

stringified macro argument is too long

The stringified macro argument is longer than 512 characters. This error is unlikely to occur in user code and it isn't practical to show an example of this failure here.

syntax error in #ifdef/#ifndef

The pre-processor found an error when processing the #ifdef or #ifndef controls. This is usually caused by extra tokens on the pre-processor control line.

syntax error in #include

The pre-processor found an error when processing the file to include in an #include directive. The usual cause of this is that the file name isn't enclosed in angle brackets or quotation marks, or that the trailing quotation mark is missing.

syntax error in macro parameters

The syntax of the comma-separated list of macro parameters in a #define pre-processor control is not correct. This can occur for a number of reasons, but most common is incorrect puctuation.

undefined expression value

The pre-processor encountered an error when evaluating an expression which caused the expression to be undefined. This is caused by dividing by zero using the division or modulus operators.

unterminated string or character constant

A string is not terminated at the end of a line.