Main Content

Ignore link errors (-no-extern-C)

(To be removed) Ignore certain linking errors

This option will be removed in a future release. For more information, see Version History.

Description

Specify that the analysis must ignore certain linking errors.

Set Option

User interface (desktop products only): In your project configuration, the option is on the Environment Settings node. See Dependency for other options that you must also enable.

User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Target & Compiler node.

Command line and options file: Use the option -no-extern-C. See Command-Line Information.

Why Use This Option

Some functions may be declared inside an extern "C" { } block in some files and not in others. In this case, their linkage is not the same, which causes a linking error according to the ANSI® standard.

Applying this option will cause Polyspace® to ignore this error. This permissive option may not resolve all the extern C linkage errors.

Settings

On

Ignore linking errors if possible.

Off (default)

Stop analysis for linking errors.

Dependency

This option is available only if you set Source code language (-lang) to CPP or C-CPP.

Command-Line Information

Parameter: -no-extern-C
Default: off
Example (Bug Finder): polyspace-bug-finder -lang cpp -no-extern-C
Example (Code Prover): polyspace-code-prover -lang cpp -no-extern-C
Example (Bug Finder Server): polyspace-bug-finder-server -lang cpp -no-extern-C
Example (Code Prover Server): polyspace-code-prover-server -lang cpp -no-extern-C

Version History

collapse all

R2024a: To be Removed

This option allows you to ignore linking errors that arise due to functions having C linkage in one source file and C++ linkage in another source file. Mixed C and C++ language linkages no longer cause errors in a Polyspace analysis. This option is no longer useful and will be removed in a future release.

If you use this option in your analysis, Polyspace issues a warning. Remove this option from your Polyspace commands and projects.