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.
The #
concatenation operator must be followed by a macro parameter
name.
The ##
operator cannot be placed at the end of a line.
The token defined immediately after #define
is not a valid pre-processor
identifier.
You cannot redefine a number of standard tokens such as __LINE__
and __STDC__
. The token you're trying to redefine is one of these.
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.
The operator operator is not allowed in pre-processor expressions.
The defined
standard pre-processor function does not conform
to the syntax defined(
name)
.
The include file file can't be found in any of the directories specified in compilation.
The macro name has been invoked with either too few or too many actual arguments according to its formal argument list.
The macro argument name has been given twice in the argument list
of a #define
pre-processor control.
The pre-processor encountered the end of file whilst processing the argument list of a macro.
The pointer dereference operator *
and the address-of operator
&
cannot be used in pre-processor expressions.
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.
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.
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.
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.
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.
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.
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.
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.
A string is not terminated at the end of a line.