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

Rule:  6.10.1.dChecked automatically with code checker

Synopsis:C headers should be guarded by extern "C".
Language:C
Severity Level:6
Category:Preprocessing Directives


Description:

Justification

Every C header file should be usable by C++ code. To make sure the C++ compiler won't complain about C constructs the C code should be guarded with extern "C".

Example

The following guard should be used in C header files:

#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif