Submission Date: 10 Dec 92
Source: X3J11/91-036 (Stephen D. Clamage)
In subclause 6.4, page 55, line 10, a constraint specifies that a comma operator may not appear in a constant expression (except within the operand of a sizeof operator).
At the end of the same section, page 56, line 1, it says, ``An implementation may accept other forms of constant expressions.''
Does the later statement give a license to relax the earlier constraint? For example, may a conforming implementation accept
int i = (1, 2);
without issuing a diagnostic?
No, a conforming implementation may not accept this example without issuing a diagnostic. Constraint violations always require a diagnostic (subclause 220.127.116.11). The intent of the statement ``An implementation may accept other forms of constant expressions'' (subclause 6.4) is to allow an implementation to accept syntactic forms, such as might be generated by the offsetof macro, that may not otherwise be semantically allowed.