Enabled Services

directive MC3R1.D1.1 (required)

Any implementation-defined behaviour on which the output of the program depends shall be documented and understood

directive MC3R1.D2.1 (required)

All source files shall compile without any compilation errors

directive MC3R1.D4.1 (required)

Run-time failures shall be minimized

directive MC3R1.D4.2 (advisory)

All usage of assembly language should be documented

directive MC3R1.D4.3 (required)

Assembly language shall be encapsulated and isolated

directive MC3R1.D4.4 (advisory)

Sections of code should not be "commented out"

directive MC3R1.D4.5 (advisory)

Identifiers in the same name space with overlapping visibility should be typographically unambiguous

directive MC3R1.D4.7 (required)

If a function returns error information, then that error information shall be tested

directive MC3R1.D4.10 (required)

Precautions shall be taken in order to prevent the contents of a header file being included more than once

directive MC3R1.D4.11 (required)

The validity of values passed to library functions shall be checked

directive MC3R1.D4.12 (required)

Dynamic memory allocation shall not be used

directive MC3R1.D4.13 (advisory)

Functions which are designed to provide operations on a resource should be called in an appropriate sequence

directive MC3R1.D4.14 (required)

The validity of values received from external sources shall be checked

parser B.PARSER

The code shall be parsable without errors by the ECLAIR parser. If the code is parsed with errors the AST is incomplete and the results of ECLAIR analyses are likely to be incorrect

reporter B.REPORT.ECB

Output reports in ECB format

reporter B.REPORT.ERR

Output B.PARSER error reports in plain text to standard error

rule MC3R1.R1.1 (required)

The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits

rule MC3R1.R1.2 (advisory)

Language extensions should not be used

rule MC3R1.R1.3 (required)

There shall be no occurrence of undefined or critical unspecified behaviour

rule MC3R1.R2.1 (required)

A project shall not contain unreachable code

rule MC3R1.R2.2 (required)

There shall be no dead code

rule MC3R1.R2.3 (advisory)

A project should not contain unused type declarations

rule MC3R1.R2.6 (advisory)

A function should not contain unused label declarations

rule MC3R1.R3.1 (required)

The character sequences `/*' and `//' shall not be used within a comment

rule MC3R1.R3.2 (required)

Line-splicing shall not be used in `//' comments

rule MC3R1.R4.1 (required)

Octal and hexadecimal escape sequences shall be terminated

rule MC3R1.R4.2 (advisory)

Trigraphs should not be used

rule MC3R1.R5.2 (required)

Identifiers declared in the same scope and name space shall be distinct

rule MC3R1.R5.3 (required)

An identifier declared in an inner scope shall not hide an identifier declared in an outer scope

rule MC3R1.R5.4 (required)

Macro identifiers shall be distinct

rule MC3R1.R5.5 (required)

Identifiers shall be distinct from macro names

rule MC3R1.R5.6 (required)

A `typedef' name shall be a unique identifier

rule MC3R1.R5.7 (required)

A tag name shall be a unique identifier

rule MC3R1.R5.9 (advisory)

Identifiers that define objects or functions with internal linkage should be unique

rule MC3R1.R6.1 (required)

Bit-fields shall only be declared with an appropriate type

rule MC3R1.R6.2 (required)

Single-bit named bit fields shall not be of a signed type

rule MC3R1.R7.1 (required)

Octal constants shall not be used

rule MC3R1.R7.2 (required)

A `u' or `U' suffix shall be applied to all integer constants that are represented in an unsigned type

rule MC3R1.R7.3 (required)

The lowercase character `l' shall not be used in a literal suffix

rule MC3R1.R7.4 (required)

A string literal shall not be assigned to an object unless the object's type is "pointer to `const'-qualified `char'"

rule MC3R1.R8.1 (required)

Types shall be explicitly specified

rule MC3R1.R8.2 (required)

Function types shall be in prototype form with named parameters

rule MC3R1.R8.3 (required)

All declarations of an object or function shall use the same names and type qualifiers

rule MC3R1.R8.4 (required)

A compatible declaration shall be visible when an object or function with external linkage is defined

rule MC3R1.R8.5 (required)

An external object or function shall be declared once in one and only one file

rule MC3R1.R8.8 (required)

The `static' storage class specifier shall be used in all declarations of objects and functions that have internal linkage

rule MC3R1.R8.9 (advisory)

An object should be defined at block scope if its identifier only appears in a single function

rule MC3R1.R8.10 (required)

An inline function shall be declared with the `static' storage class

rule MC3R1.R8.11 (advisory)

When an array with external linkage is declared, its size should be explicitly specified

rule MC3R1.R8.12 (required)

Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique

rule MC3R1.R8.13 (advisory)

A pointer should point to a `const'-qualified type whenever possible

rule MC3R1.R8.14 (required)

The `restrict' type qualifier shall not be used

rule MC3R1.R9.1 (mandatory)

The value of an object with automatic storage duration shall not be read before it has been set

rule MC3R1.R9.2 (required)

The initializer for an aggregate or union shall be enclosed in braces

rule MC3R1.R9.3 (required)

Arrays shall not be partially initialized

rule MC3R1.R9.4 (required)

An element of an object shall not be initialized more than once

rule MC3R1.R9.5 (required)

Where designated initializers are used to initialize an array object the size of the array shall be specified explicitly

rule MC3R1.R10.1 (required)

Operands shall not be of an inappropriate essential type

rule MC3R1.R10.2 (required)

Expressions of essentially character type shall not be used inappropriately in addition and subtraction operations

rule MC3R1.R10.3 (required)

The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category

rule MC3R1.R10.4 (required)

Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type category

rule MC3R1.R10.5 (advisory)

The value of an expression should not be cast to an inappropriate essential type

rule MC3R1.R10.6 (required)

The value of a composite expression shall not be assigned to an object with wider essential type

rule MC3R1.R10.7 (required)

If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type

rule MC3R1.R10.8 (required)

The value of a composite expression shall not be cast to a different essential type category or a wider essential type

rule MC3R1.R11.1 (required)

Conversions shall not be performed between a pointer to a function and any other type

rule MC3R1.R11.2 (required)

Conversions shall not be performed between a pointer to an incomplete type and any other type

rule MC3R1.R11.3 (required)

A cast shall not be performed between a pointer to object type and a pointer to a different object type

rule MC3R1.R11.6 (required)

A cast shall not be performed between pointer to `void' and an arithmetic type

rule MC3R1.R11.7 (required)

A cast shall not be performed between pointer to object and a non-integer arithmetic type

rule MC3R1.R11.8 (required)

A cast shall not remove any `const' or `volatile' qualification from the type pointed to by a pointer

rule MC3R1.R11.9 (required)

The macro `NULL' shall be the only permitted form of integer null pointer constant

rule MC3R1.R12.1 (advisory)

The precedence of operators within expressions should be made explicit

rule MC3R1.R12.2 (required)

The right hand operand of a shift operator shall lie in the range zero to one less than the width in bits of the essential type of the left hand operand

rule MC3R1.R12.3 (advisory)

The comma operator should not be used

rule MC3R1.R12.4 (advisory)

Evaluation of constant expressions should not lead to unsigned integer wrap-around

rule MC3R1.R12.5 (mandatory)

The `sizeof' operator shall not have an operand which is a function parameter declared as "array of type"

rule MC3R1.R13.1 (required)

Initializer lists shall not contain persistent side effects

rule MC3R1.R13.2 (required)

The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders

rule MC3R1.R13.3 (advisory)

A full expression containing an increment (`++') or decrement (`--') operator should have no other potential side effects other than that caused by the increment or decrement operator

rule MC3R1.R13.4 (advisory)

The result of an assignment operator should not be used

rule MC3R1.R13.5 (required)

The right hand operand of a logical `&&' or `||' operator shall not contain persistent side effects

rule MC3R1.R13.6 (mandatory)

The operand of the `sizeof' operator shall not contain any expression which has potential side effects

rule MC3R1.R14.1 (required)

A loop counter shall not have essentially floating type

rule MC3R1.R14.2 (required)

A `for' loop shall be well-formed

rule MC3R1.R14.3 (required)

Controlling expressions shall not be invariant

rule MC3R1.R14.4 (required)

The controlling expression of an `if' statement and the controlling expression of an iteration-statement shall have essentially Boolean type

rule MC3R1.R15.2 (required)

The `goto' statement shall jump to a label declared later in the same function

rule MC3R1.R15.3 (required)

Any label referenced by a `goto' statement shall be declared in the same block, or in any block enclosing the `goto' statement

rule MC3R1.R15.4 (advisory)

There should be no more than one `break' or `goto' statement used to terminate any iteration statement

rule MC3R1.R15.7 (required)

All `if ... else if' constructs shall be terminated with an `else' statement

rule MC3R1.R16.2 (required)

A switch label shall only be used when the most closely-enclosing compound statement is the body of a `switch' statement

rule MC3R1.R16.4 (required)

Every `switch' statement shall have a `default' label

rule MC3R1.R16.5 (required)

A `default' label shall appear as either the first or the last switch label of a `switch' statement

rule MC3R1.R16.6 (required)

Every `switch' statement shall have at least two switch-clauses

rule MC3R1.R16.7 (required)

A switch-expression shall not have essentially Boolean type

rule MC3R1.R17.2 (required)

Functions shall not call themselves, either directly or indirectly

rule MC3R1.R17.3 (mandatory)

A function shall not be declared implicitly

rule MC3R1.R17.4 (mandatory)

All exit paths from a function with non-`void' return type shall have an explicit `return' statement with an expression

rule MC3R1.R17.5 (advisory)

The function argument corresponding to a parameter declared to have an array type shall have an appropriate number of elements

rule MC3R1.R17.6 (mandatory)

The declaration of an array parameter shall not contain the `static' keyword between the `[ ]'

rule MC3R1.R17.7 (required)

The value returned by a function having non-void return type shall be used

rule MC3R1.R17.8 (advisory)

A function parameter should not be modified

rule MC3R1.R18.1 (required)

A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand

rule MC3R1.R18.2 (required)

Subtraction between pointers shall only be applied to pointers that address elements of the same array

rule MC3R1.R18.3 (required)

The relational operators `>', `>=', `<' and `<=' shall not be applied to objects of pointer type except where they point into the same object

rule MC3R1.R18.4 (advisory)

The `+', `-', `+=' and `-=' operators should not be applied to an expression of pointer type

rule MC3R1.R18.5 (advisory)

Declarations should contain no more than two levels of pointer nesting

rule MC3R1.R18.6 (required)

The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist

rule MC3R1.R18.7 (required)

Flexible array members shall not be declared

rule MC3R1.R18.8 (required)

Variable-length array types shall not be used

rule MC3R1.R19.1 (mandatory)

An object shall not be assigned or copied to an overlapping object

rule MC3R1.R19.2 (advisory)

The `union' keyword should not be used

rule MC3R1.R20.1 (advisory)

`#include' directives should only be preceded by preprocessor directives or comments

rule MC3R1.R20.2 (required)

The `'', `"' or `\' characters and the `/*' or `//' character sequences shall not occur in a header file name

rule MC3R1.R20.3 (required)

The `#include' directive shall be followed by either a `<filename>' or `"filename"' sequence

rule MC3R1.R20.4 (required)

A macro shall not be defined with the same name as a keyword

rule MC3R1.R20.5 (advisory)

`#undef' should not be used

rule MC3R1.R20.6 (required)

Tokens that look like a preprocessing directive shall not occur within a macro argument

rule MC3R1.R20.7 (required)

Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses

rule MC3R1.R20.8 (required)

The controlling expression of a `#if' or `#elif' preprocessing directive shall evaluate to 0 or 1

rule MC3R1.R20.9 (required)

All identifiers used in the controlling expression of `#if' or `#elif' preprocessing directives shall be #define'd before evaluation

rule MC3R1.R20.12 (required)

A macro parameter used as an operand to the `#' or `##' operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators

rule MC3R1.R21.1 (required)

`#define' and `#undef' shall not be used on a reserved identifier or reserved macro name

rule MC3R1.R21.2 (required)

A reserved identifier or reserved macro name shall not be declared

rule MC3R1.R21.3 (required)

The memory allocation and deallocation functions of `<stdlib.h>' shall not be used

rule MC3R1.R21.4 (required)

The standard header file `<setjmp.h>' shall not be used

rule MC3R1.R21.5 (required)

The standard header file `<signal.h>' shall not be used

rule MC3R1.R21.7 (required)

The Standard Library functions `atof', `atoi', `atol' and `atoll' of `<stdlib.h>' shall not be used

rule MC3R1.R21.8 (required)

The Standard Library functions `abort', `exit' and `system' of `<stdlib.h>' shall not be used

rule MC3R1.R21.9 (required)

The Standard Library functions `bsearch' and `qsort' of `<stdlib.h>' shall not be used

rule MC3R1.R21.11 (required)

The standard header file `<tgmath.h>' shall not be used

rule MC3R1.R21.13 (mandatory)

Any value passed to a function in `<ctype.h>' shall be representable as an unsigned char or be the value `EOF'

rule MC3R1.R21.14 (required)

The Standard Library function `memcmp' shall not be used to compare null terminated strings

rule MC3R1.R21.15 (required)

The pointer arguments to the Standard Library functions `memcpy', `memmove' and `memcmp' shall be pointers to qualified or unqualified versions of compatible types

rule MC3R1.R21.16 (required)

The pointer arguments to the Standard Library function `memcmp' shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum type

rule MC3R1.R21.17 (mandatory)

Use of the string handling functions from `<string.h>' shall not result in accesses beyond the bounds of the objects referenced by their pointer parameters

rule MC3R1.R21.18 (mandatory)

The `size_t' argument passed to any function in `<string.h>' shall have an appropriate value

rule MC3R1.R21.19 (mandatory)

The pointers returned by the Standard Library functions `localeconv', `getenv', `setlocale' or, `strerror' shall only be used as if they have pointer to const-qualified type

rule MC3R1.R21.20 (mandatory)

The pointer returned by the Standard Library functions `asctime', `ctime' , `gmtime', `localtime', `localeconv', `getenv', `setlocale' or `strerror' shall not be used following a subsequent call to the same function

rule MC3R1.R22.1 (required)

All resources obtained dynamically by means of Standard Library functions shall be explicitly released

rule MC3R1.R22.2 (mandatory)

A block of memory shall only be freed if it was allocated by means of a Standard Library function

rule MC3R1.R22.3 (required)

The same file shall not be open for read and write access at the same time on different streams

rule MC3R1.R22.4 (mandatory)

There shall be no attempt to write to a stream which has been opened as read-only

rule MC3R1.R22.5 (mandatory)

A pointer to a `FILE' object shall not be dereferenced

rule MC3R1.R22.6 (mandatory)

The value of a pointer to a `FILE' shall not be used after the associated stream has been closed

rule MC3R1.R22.7 (required)

The macro `EOF' shall only be compared with the unmodified return value from any Standard Library function capable of returning `EOF'

rule MC3R1.R22.8 (required)

The value of `errno' shall be set to zero prior to a call to an errno-setting-function

rule MC3R1.R22.9 (required)

The value of `errno' shall be tested against zero after calling an errno-setting-function

rule MC3R1.R22.10 (mandatory)

The value of `errno' shall only be tested when the last function to be called was an errno-setting-function

rule MC3R1.R20.10 (advisory)

The `#' and `##' preprocessor operators should not be used

rule MC3R1.R20.11 (required)

A macro parameter immediately following a `#' operator shall not immediately be followed by a `##' operator

rule MC3R1.R20.13 (required)

A line whose first token is `#' shall be a valid preprocessing directive

rule MC3R1.R20.14 (required)

All `#else', `#elif' and `#endif' preprocessor directives shall reside in the same file as the `#if', `#ifdef' or `#ifndef' directive to which they are related

rule MC3R1.R21.10 (required)

The Standard Library time and date functions shall not be used

rule MC3R1.R21.12 (advisory)

The exception handling features of `<fenv.h>' should not be used

tool B.CBT

Tag reports using ECLAIR style comments

tool B.EXPLAIN

Explain user configuration

tool B.TOOLCHAIN

ECLAIR shall be able to retrieve toolchain information from the toolchain itself