TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
ASML C Coding Standard
Search

Category: Conceptual Models

Synopsis:Rules about the translation and execution environment


Description:

An implementation translates C source files and executes C programs in two data-processing-system environments, which will be called the translation environment and the execution environment in this document. Their characteristics define and constrain the results of executing conforming C programs constructed according to the syntactic and semantic rules for conforming implementations.

Coding Rules

NameCheckedSynopsis
5.1.1.b Checked automatically with code checker Each source file shall start with a file header, for which the "file name", "description" and copyright notice are to be filled in.
5.1.1.c With respect to includes, each source file (.c and .h) shall be self-contained.
5.1.1.d Only files that are really needed shall be included.
5.1.1.f Checked automatically with code checker With respect to user files, it is good practice to place the include of the header file with the own definitions of the source file at the top.
5.1.1.1.b Checked automatically with code checker The content (body) of every header file shall be enclosed in #ifndef/#if !defined, #define and #endif.
5.1.1.1.c Checked automatically with code checker Naming convention of the include guard of an include file named CCBB_foo.h is of format: CCBB_FOO_H
5.1.1.2.b Checked automatically with code checker Each non-trivial function shall be accompanied by a doxygen style function header.
5.1.2.b Local variables shall not cause stack overflow.
5.1.2.3.a Checked automatically with code checker Side effects shall not be relied upon between successive sequence points.
5.1.2.3.b Checked automatically with code checker Expressions which mix operators from the set ">", ">=", "<", "<=", "==", "!=" with the binary operators from the set "<<", ">>", "^", "&", "|", "&&", "||" and which use two or more distinct operators from the latter set shall be fully parenthesized and shall not depend on the C precedence rules.