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

Rule:  6.10.2.aChecked automatically with code checker

Synopsis:All headers files shall be identified by an #include directive.
Language:C
Severity Level:2
Category:Preprocessing Directives


Description:

Justification

Because "include <>" also searches system directories while "include """ doesn't, we shall use "#include <>" for inclusion of system header files (such as stdio.h). For other files "#include """ shall be used. Using (absolute) paths is a cause of build errors in a complex and/or flexible build environment.

Example

#include <stdio.h> /* RIGHT: System Includes */
#include "own_lib.h" /* RIGHT: Own Component Includes */
#include " somefile.h" /* WRONG: extra space */
#include"somefile.h" /* WRONG: missing space */
#include "../any_header_file.h"  /* WRONG: do not use .. */