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

SR:  A.3.1#2Checked automatically with code checker

Synopsis:Every header file shall use #ifndef .. #endif to prevent its body being #included multiple times.
Language:C
Severity Level:2
Category:NON-LANGUAGE ISSUES


Description:
Since a header file may be used by source files and other header files, there is no way of knowing what order header files will be #included, nor how many times any particular header will be #included.

Example:

/* include file header comment
*/
#ifndef included_HEADER_H
#define included_HEADER_H
/*
* body of header file
*/
#endif