The ISO C language definition


Substantial parts of the C language are not well defined enough to rely on in many circumstances. QA C contains a knowledge base of such issues and helps the user to detect any reliance on them. There is strong evidence from measurement that, without such control, commercially released systems contain many such faults.

Types of unsafe behaviour explicitly defined

There are four types of unsafe behaviour described in Appendix G of the C Standard, ISO/IEC 9899:1990:

Unspecified behaviour (22 items)

Undefined behaviour (97 items)

Implementation-defined behaviour (76 items)

Locale-specific behaviour (6 items)

Many of these are statically detectable and should not appear in a safer subset.

Dangerous behaviour not explicitly defined

Implicitly undefined behaviour

Approximately 50 issues have arisen since the standard was released. This low number is indicative of the fundamental agreement which existed about the C definition. Again, many of these are statically detectable.

Empirically-determined misbehaviour

This tends to be language independent, for example, incomplete logical structures. In C, these appear most often as switch statements without a default clause, and if .. else if clauses with no else. Again, these are statically detectable. All logical structures should be complete, for example completing them with a statement that their execution indicates a requirements error or an unforeseen external condition.

Index