I have some trouble understanding semantics of 5.1.1.3/1 Diagnostics subclause from N1570 C11 draft (emphasis mine):
A conforming implementation shall produce at least one diagnostic message (identified in an implementation-defined manner) if a preprocessing translation unit or translation unit contains a violation of any syntax rule or constraint, even if the behavior is also explicitly specified as undefined or implementation-defined. Diagnostic messages need not be produced in other circumstances.9
I understand that the intent was to exclude (non-constraint) undefined behavior (thus that are no diagnostics on e.g. buffer overflow), but what about #error directive? As in 6.10.5/1 Error directive:
A preprocessing directive of the form
# errorpp-tokensopt new-linecauses the implementation to produce a diagnostic message that includes the specified sequence of preprocessing tokens.
Does these both subclauses are not mutually exclusive?
For some other reference see also DR#176.
#errorshould always produce a diagnostic message, but this wasn't mentioned in the former clause. - Drew McGowen5.1.1.3/1) means that "conforming implementation is required to" and this subclause is normative. - Grzegorz Szpetkowski