This rule is Obsolete | |
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 |