Diagnostic messages have an associated severity, as follows:
A configuration flag controls whether or not the string "error:"
appears, i.e., the front end can be configured so that the severity
string is omitted when the severity is "error".
A command line option may be used to request a shorter form of the
diagnostic output in which the original source line is not displayed
and the error message text is not wrapped when too long to fit
on a single line.
A command line option may be used to request
that the error number be included in the diagnostic message. When
displayed, the error number also indicates whether the error may
have its severity overridden on the command line. If the severity
may be overridden, the error number will include the suffix "-D"
(for "discretionary"); otherwise no suffix will be present.
"Test_name.c", line 7: error #64-D: declaration
does not declare anything
struct {};
^
"Test_name.c", line 9: error #77: this declaration
has no storage class or type specifier
x;
^
Because an error is determined to be discretionary based on the
error severity associated with a specific context, a given error
may be discretionary in some cases and not in others.
For some
messages, a list of entities is useful; they are listed following
the initial error message:
"test.c", line 4: error more than one instance of overloaded function "f" matches the argument list:
function "f(int)"
function "f(float)"
argument types are: (double)
f(1.5);
^
Without the context information, it is very hard to figure out
what the error refers to.
is written to indicate the detection of errors in the compilation.
No message is written if no errors were detected. The following
message
is written at the end of a compilation that was prematurely terminated
because of a catastrophic error. The message
is written at the end of a compilation that was prematurely terminated
because of an internal error. Such an error indicates an internal
problem in the compiler and should be reported to Comeau.
On completion, the front end returns with a code indicating the
highest-severity diagnostic detected: