Fortify Static Code Analyzer – Troubleshooting C/C++ Precompiled Header Files

C/C++ Precompiled Header Files

Some C/C++ compilers support Precompiled Header Files, which can improve compilation performance. Some compilers’ implementations of this feature have subtle side-effects. When the feature is enabled, the compiler might accept erroneous source code without warnings or errors. This can result in a discrepancy where Fortify Static Code Analyzer reports translation errors even when your compiler does not.

If you use your compiler’s Precompiled Header feature, disable Precompiled Headers, and then perform a full build to make sure that your source code compiles cleanly.

Leave a Comment