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

Rule:  POR#018Checked automatically with code checker

Synopsis:Avoid the use of #pragma directives
Language:C++
Severity Level:6
Category:Portability


Description:


Exception 1:
The use of the #pragma preprocessor directive is allowed in specific files which special purpose is to shield or implement platform dependent code. Such a #pragma shall be conditionally defined based on a macro that identifies the platform. This makes the platform dependency explicit. See also [POR#021].

Exception 2:
#pragma once is allowed to prevent multiple inclusion of a file. See also [ORG#001].



Literature References:
ISC++ Rec. 15.3