File does not compile
File has a compilation error
Description
This defect occurs when Polyspace® cannot analyze a file because of compilation errors. The defect is located on the first line and column of the file, and indicates that the file has one or more compilation errors.
To find the actual compilation errors, see the analysis log. For information on how to investigate further in:
Polyspace Bug Finder™ or Polyspace Bug Finder Server™, see View Compilation Errors When Running Polyspace Static Analysis.
Polyspace as You Code™, see how to follow the progress of analysis in your IDE. See steps in Visual Studio (Polyspace as You Code), Visual Studio Code (Polyspace as You Code) or Eclipse (Polyspace as You Code).
Use this checker to find out at a glance whether you have files with compilation issues in an integration analysis (Polyspace Bug Finder or Polyspace Bug Finder Server) or whether the current file being analyzed does not compile yet (Polyspace as You Code). Using this checker saves you from opening the analysis log each time to find out if there are compilation issues. You can determine from your analysis results if a file did not compile.
Risk
Typically, your compiler can also find the issues that this defect checker finds.
If your file compiles with your compiler but the compilation phase of a Polyspace analysis fails, it means that your analysis configuration does not emulate
your compiler accurately. For instance, if the analysis fails because a standard library
function appears to be undefined, you might have to explicitly specify the folders
containing your compiler headers, use the polyspace-configure command to
extract the paths, or otherwise improve your configuration.
Fix
Identify all compilation errors from the analysis log and fix them.
Examples
Result Information
| Group: Good Practice |
| Language: C | C++ |
| Default: Off in Polyspace Bug Finder, on in Polyspace as You Code |
Command-Line Syntax:
FILE_DOES_NOT_COMPILE
|
| Impact: Low |
PQL Name:
std.defects.FILE_DOES_NOT_COMPILE
|
Version History
Introduced in R2021aSee Also
Find defects
(-checkers) | Stop analysis if a file does not
compile (-stop-if-compile-error)
Topics
- Interpret Polyspace Bug Finder Results in Polyspace Platform User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Polyspace Results Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)