Constraints

suggest change

Remarks

"Constraint" is a term used in the C standard (for example, ISO/IEC 9899:2011). In clause 6, the language is described through syntax, constraints, and semantics.

ISO-IEC 9899-2011 defines a constraint as a:

restriction, either syntactic or semantic, by which the exposition of language elements is to be interpreted

(Please also note, in terms of the C standard, a “runtime-constraint” is not a kind of constraint and has extensively different rules.)

A constraint is a language rule whose violation makes the program invalid. Unlike undefined behavior, a constraint violation requires a diagnostic during translation. The diagnostic may be a warning, or the implementation may reject the program. After issuing the diagnostic, an implementation may still accept the program as an extension.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents