Help Center

Reference Manual for PC-lint® Plus

Contents

 1 Introduction 1.1 Overview
  1.2 Flow of Execution
  1.3 An Example

2 Installation and Configuration 2.1 System Requirements
   2.1.1 Supported Operating Systems
   2.1.2 Supported File Encodings
   2.1.3 Hardware Requirements
   2.1.4 Antivirus Software
  2.2 Installation
   2.2.1 Setting the PATH environment variable on Windows
   2.2.2 Setting the PATH environment variable on Linux
   2.2.3 Setting the PATH environment variable on macOS
  2.3 Configuring with pclp_config
   2.3.1 Overview
   2.3.2 Introduction and Walkthrough of Automated Configuration with pclp_config
   2.3.3 Creating a compiler configuration for GCC or Clang
   2.3.4 Creating a compiler configuration for Microsoft C/C++ compilers
   2.3.5 Creating a compiler configuration for IAR Embedded compilers
   2.3.6 Creating a compiler configuration for Keil μVision ARMCC
   2.3.7 Creating a compiler configuration for Keil μVision ARMCLANG
   2.3.8 Creating a compiler configuration for Microchip MPLAB X XC8/XC16/XC32
   2.3.9 Creating a compiler configuration for MetaWare ccac ARC V2 EM/V2 HS/V3 HS/etc.
   2.3.10 Creating a compiler configuration for Texas Instruments Code Composer Studio compilers
   2.3.11 Creating a compiler configuration for Green Hills Software compilers
   2.3.12 Creating a compiler configuration for SEGGER compilers
   2.3.13 Creating a project configuration with a JSON compilation database
   2.3.14 Creating a project configuration with make or cmake
   2.3.15 Creating a project configuration with MSBuild on Windows
   2.3.16 Integrating PC-lint Plus with IAR Embedded Workbench
   2.3.17 Integrating PC-lint Plus with Keil μVision
   2.3.18 Integrating PC-lint Plus with MPLAB X
   2.3.19 Integrating PC-lint Plus with Eclipse-based IDEs
   2.3.20 Integrating PC-lint Plus with Visual Studio Code
   2.3.21 Integrating PC-lint Plus with SEGGER IDE
   2.3.22 Integrating PC-lint Plus with Sublime Text 3 IDE
   2.3.23 Integrating PC-lint Plus with Code Composer Studio IDE
   2.3.24 Using the pclpvscfg.exe GUI utility to generate a compiler and project configuration for Microsoft Visual Studio
   2.3.25 pclp_config Options Reference
   2.3.26 imposter Options Reference
  2.4 Configuring manually

3 The Command Line 3.1 Indirect (.lnt) files
  3.2 Exit Code
  3.3 Built-in version environment variables

4 Options 4.1 Rules for Specifying Options
   4.1.1 Options within Comments
   4.1.2 Lint Comments inside of Macro Definitions
   4.1.3 Options on the Command Line
   4.1.4 Specifying Option Arguments
   4.1.5 Quoted Options and Arguments
   4.1.6 Quotes in Arguments
   4.1.7 Braces within Argument Lists
   4.1.8 Braces and Quotes
   4.1.9 Brace Types in Brace-Enclosed Argument Lists
   4.1.10 Option Display
   4.1.11 Expansion of Environment Variables in Options
   4.1.12 Escaping Special Characters
   4.1.13 Option Tags
  4.2 Option Reference
  4.3 Message Options
   4.3.1 Error Inhibition
   4.3.2 Verbosity
   4.3.3 Message Presentation
  4.4 Processing Options
   4.4.1 Compiler Adaptation
   4.4.2 Preprocessor
   4.4.3 Tokenizing
   4.4.4 Parsing
  4.5 Data Options
   4.5.1 Scalar Data Size
   4.5.2 Scalar Data Alignment
  4.6 Miscellaneous Options
   4.6.1 File
   4.6.2 Global
   4.6.3 Output
  4.7 Special Detection Options
   4.7.1 Metrics
   4.7.2 Thread Analysis
   4.7.3 Strong Type
   4.7.4 Miscellaneous Detection
   4.7.5 Semantic
   4.7.6 Value Tracking
  4.8 Meta Characters for Options
  4.9 How Suppression Options are Applied
  4.10 Rules for Parameterized Suppressions
  4.11 Flag Options
  4.12 Compiler Adaptation
   4.12.1 Customization Facilities
   4.12.2 Identifier Characters
   4.12.3 Preprocessor Statements
   4.12.4 In-line assembly code
   4.12.5 Pragmas
   4.12.6 Built-in pragmas
   4.12.7 User pragmas
   4.12.8 Arbitrary Width Integer Types

5 Libraries 5.1 Library Header Files
  5.2 Library Modules
  5.3 Assembly Language Modules

6 Precompiled Headers 6.1 Introduction to precompiled headers
  6.2 Designating the precompiled header
  6.3 Monitoring precompiled headers
  6.4 The use of make files
  6.5 Lint comment options and precompiled headers

7 Strong Types 7.1 Rationale
  7.2 Creating Strong Types with -strong
  7.3 Strong Types for Array Indices
  7.4 Dimensional Analysis
   7.4.1 Dimensional Types
   7.4.2 Dimensionally Neutral Types
   7.4.3 Antidimensional Types
   7.4.4 Multiplication and Division of Dimensional Types
   7.4.5 Dimensional Types and the % operator
   7.4.6 Conversions
   7.4.7 Integers
  7.5 Strong Type Hierarchies
   7.5.1 The Need for a Type Hierarchy
   7.5.2 The Natural Type Hierarchy
   7.5.3 Adding to the Natural Hierarchy
   7.5.4 Restricting Down Assignments (-father)
  7.6 Printing the Hierarchy Tree
  7.7 Reference Information
   7.7.1 Full Source for the Gravitation Example
   7.7.2 The Strong Type of an Expression
   7.7.3 Canonical Form for Dimensional Strong Types
   7.7.4 Message Numbers

8 Value Tracking 8.1 Introduction
   8.1.1 Anatomy of a Value Tracking Message
  8.2 Value Inferencing
   8.2.1 Conditionals
   8.2.2 Assertions
  8.3 Integer Range Tracking
  8.4 Terminology
  8.5 Value Display Format
   8.5.1 Integers
   8.5.2 Pointers in General
   8.5.3 Pointers to a Single Datum
   8.5.4 Pointers to Buffers with Multiple Elements
   8.5.5 Objects of Structure or Class Type
   8.5.6 File Streams
   8.5.7 Uninitialized Values
  8.6 General Usage
  8.7 Debugger
  8.8 Interfunction and Intermodule Value Tracking
  8.9 Limitations
   8.9.1 Initial Values of Static Variables
   8.9.2 The Correlated Variables Problem
   8.9.3 Terminal Depth Assistance
  8.10 Changes from Older Products

9 Semantics 9.1 Function Mimicry (-function)
   9.1.1 Special Functions
   9.1.2 Function Listing
   9.1.3 Other names with special behavior that cannot be mimicked
  9.2 Semantic Specifications (-sem)
   9.2.1 Possible Semantics
   9.2.2 Semantic Expressions
   9.2.3 Notes on Semantic Specifications

10 Metrics 10.1 Introduction
   10.1.1 Terminology
   10.1.2 Options
  10.2 Metric Report
   10.2.1 Metric Nomination
   10.2.2 Report Fields
  10.3 Metric Expressions
   10.3.1 Built-in Functions
  10.4 Metric Checking
   10.4.1 Metric Violation Messages
   10.4.2 Integration with Queries
  10.5 Custom Metrics
   10.5.1 Examples
  10.6 Built-in Metrics
   10.6.1 Definitions
   10.6.2 Project (project)
   10.6.3 Translation Unit (translation_unit)
   10.6.4 File (file)
   10.6.5 Function (function)
   10.6.6 Class (class)
   10.6.7 Dynamic Metrics
  10.7 Sample Derived Metrics
   10.7.1 Class (class)

11 Thread Analysis 11.1 Introduction
  11.2 Library Support
  11.3 Identifying Threads
   11.3.1 Options to Identify Threads
   11.3.2 Automatic Identification of Threads
  11.4 Mutual Exclusion
   11.4.1 Trylock-like Functions
   11.4.2 Locker Classes
   11.4.3 Shared Locks
   11.4.4 Internal Global Recursive Mutex
  11.5 Function Pointers
  11.6 Thread Unfriendly Functions
   11.6.1 Category 1 Functions
   11.6.2 Category 2 Functions
   11.6.3 Category 3 Function
   11.6.4 Category 4 Function
   11.6.5 Category 5 Function
  11.7 Thread Local Storage
   11.7.1 _Thread_local
   11.7.2 thread_local
   11.7.3 __thread
   11.7.4 __declspec(thread)
  11.8 Limitations
  11.9 Thread Analysis Reports
   11.9.1 Field Types and Representation
   11.9.2 Thread Reports
   11.9.3 Function Reports
   11.9.4 Mutex Reports
   11.9.5 Variable Reports
  11.10 Message Summary
  11.11 Thread Analysis Phases
   11.11.1 Inhibition of Thread Analysis
  11.12 Supporting Other Thread Libraries
   11.12.1 Thread Semantics
   11.12.2 Mutex Semantics
   11.12.3 Locker Semantics
   11.12.4 Trylock Semantics

12 MISRA® Standards Checking 12.1 MISRA C:2025
   12.1.1 MISRA C:2025 Guideline Support Summary
   12.1.2 MISRA C:2025 Guideline Support Matrix
  12.2 MISRA C:2023
   12.2.1 MISRA C:2023 Guideline Support Summary
   12.2.2 MISRA C:2023 Guideline Support Matrix
  12.3 MISRA C 2012
   12.3.1 MISRA C 2012 Guideline Support Summary
   12.3.2 MISRA C 2012 Guideline Support Matrix
  12.4 MISRA C 2012 AMD-1
   12.4.1 MISRA C 2012 AMD-1 Guideline Support Summary
   12.4.2 MISRA C 2012 AMD-1 Guideline Support Matrix
  12.5 MISRA C 2012 AMD-2
   12.5.1 MISRA C 2012 AMD-2 Guideline Support Summary
   12.5.2 MISRA C 2012 AMD-2 Guideline Support Matrix
  12.6 MISRA C 2012 AMD-3
   12.6.1 MISRA C 2012 AMD-3 Guideline Support Summary
   12.6.2 MISRA C 2012 AMD-3 Guideline Support Matrix
  12.7 MISRA C 2012 AMD-4
   12.7.1 MISRA C 2012 AMD-4 Guideline Support Summary
   12.7.2 MISRA C 2012 AMD-4 Guideline Support Matrix
  12.8 MISRA C++:2023
   12.8.1 MISRA C++:2023 Guideline Support Summary
   12.8.2 MISRA C++:2023 Guideline Support Matrix
  12.9 MISRA C++:2008
   12.9.1 MISRA C++ Guideline Support Summary
   12.9.2 MISRA C++ Guideline Support Matrix
  12.10 MISRA C 2004
   12.10.1 MISRA C 2004 Guideline Support Summary
   12.10.2 MISRA C 2004 Guideline Support Matrix

13 AUTOSAR® Standard Checking 13.1 Introduction to AUTOSAR Support
  13.2 AUTOSAR19
   13.2.1 AUTOSAR19 Guideline Support Summary
   13.2.2 AUTOSAR19 Guideline Support Matrix
  13.3 AUTOSAR17
   13.3.1 AUTOSAR17 Guideline Support Summary
   13.3.2 AUTOSAR17 Guideline Support Matrix

14 CERT® C Standard Checking 14.1 Introduction to CERT C Support
  14.2 CERT C Support
   14.2.1 CERT C Guideline Support Summary
   14.2.2 CERT C Guideline Support Matrix

15 CWEChecking 15.1 Introduction to CWE Support
  15.2 CWE Support
   15.2.1 CWE Support Summary
   15.2.2 CWE Support Matrix

16 Queries 16.1 Introduction
  16.2 Overview
  16.3 Query Fundamentals
   16.3.1 Types and Values
   16.3.2 Query Execution
   16.3.3 Numeric Operators
   16.3.4 String Operators
   16.3.5 The AST
   16.3.6 Relational Operators
   16.3.7 Variables and Assignment
   16.3.8 The message Operator
   16.3.9 The verbosify Operator
   16.3.10 Logical Operators
   16.3.11 The if Expression
   16.3.12 The while Expression
   16.3.13 The echo Operator
   16.3.14 Compound Expressions
   16.3.15 Parentheses
   16.3.16 Operator Precedence
  16.4 Builtin Functions
   16.4.1 Function Call Syntax
   16.4.2 Default Arguments
   16.4.3 Naming Conventions
  16.5 Examples
   16.5.1 -astquery Examples
   16.5.2 -equery Examples
  16.6 Regular Expression Basics
   16.6.1 Regular Characters and Metacharacters
   16.6.2 Pattern Anchoring
   16.6.3 Dot and Repetition
   16.6.4 Alternation
   16.6.5 Subpatterns
   16.6.6 Backslash
   16.6.7 Character Classes
   16.6.8 Captures
   16.6.9 Mode Modifiers
  16.7 Debugging Queries
   16.7.1 The assert Operator
   16.7.2 Dumping the Query Tree
  16.8 Builtin Function List
   16.8.1 Non-member functions
   16.8.2 ASTNode functions
   16.8.3 ASTType functions
   16.8.4 AbstractConditionalOperator functions
   16.8.5 ArraySubscriptExpr functions
   16.8.6 AttributedStmt functions
   16.8.7 BinaryOperator functions
   16.8.8 CXXBoolLiteralExpr functions
   16.8.9 CXXCatchStmt functions
   16.8.10 CXXConstructExpr functions
   16.8.11 CXXConstructorDecl functions
   16.8.12 CXXConversionDecl functions
   16.8.13 CXXDestructorDecl functions
   16.8.14 CXXForRangeStmt functions
   16.8.15 CXXMethodDecl functions
   16.8.16 CXXRecordDecl functions
   16.8.17 CXXTryStmt functions
   16.8.18 CallExpr functions
   16.8.19 CastExpr functions
   16.8.20 CharacterLiteral functions
   16.8.21 CompoundStmt functions
   16.8.22 CoreturnStmt functions
   16.8.23 CoroutineBodyStmt functions
   16.8.24 Decl functions
   16.8.25 DeclRefExpr functions
   16.8.26 DoStmt functions
   16.8.27 EnumConstantDecl functions
   16.8.28 EnumDecl functions
   16.8.29 Expr functions
   16.8.30 FieldDecl functions
   16.8.31 FloatingLiteral functions
   16.8.32 ForStmt functions
   16.8.33 FriendDecl functions
   16.8.34 FriendTemplateDecl functions
   16.8.35 FunctionDecl functions
   16.8.36 GotoStmt functions
   16.8.37 IfStmt functions
   16.8.38 InitListExpr functions
   16.8.39 IntegerLiteral functions
   16.8.40 LabelDecl functions
   16.8.41 LabelStmt functions
   16.8.42 LambdaExpr functions
   16.8.43 LinkageSpecDecl functions
   16.8.44 Location functions
   16.8.45 MemberExpr functions
   16.8.46 NamedDecl functions
   16.8.47 NamespaceAliasDecl functions
   16.8.48 NamespaceDecl functions
   16.8.49 NullStmt functions
   16.8.50 ParenExpr functions
   16.8.51 ParmVarDecl functions
   16.8.52 RecordDecl functions
   16.8.53 ReturnStmt functions
   16.8.54 StaticAssertDecl functions
   16.8.55 Stmt functions
   16.8.56 String functions
   16.8.57 StringLiteral functions
   16.8.58 SwitchCase functions
   16.8.59 SwitchStmt functions
   16.8.60 TagDecl functions
   16.8.61 TypeDecl functions
   16.8.62 TypedefNameDecl functions
   16.8.63 UnaryOperator functions
   16.8.64 UsingDecl functions
   16.8.65 UsingDirectiveDecl functions
   16.8.66 ValueDecl functions
   16.8.67 ValueStmt functions
   16.8.68 VarDecl functions
   16.8.69 WhileStmt functions

17 Other Features 17.1 Format Checking
   17.1.1 Dangerous Use
   17.1.2 Argument Inconsistencies
   17.1.3 Positional Arguments
   17.1.4 Non-ISO features
   17.1.5 Incorrect Format Specifiers
   17.1.6 Suspicious Format Specifiers
   17.1.7 Elective Notes and Customization
  17.2 Precision, Viable Bit Patterns, and Representable Values
  17.3 Static Initialization
  17.4 Indentation Checking
  17.5 Size of Scalars
  17.6 Stack Usage Report
  17.7 Migrating to 64 bits
  17.8 Deprecation of Entities
   17.8.1 Deprecation of Options
   17.8.2 Deprecation of Types
   17.8.3 Deprecation of Preprocessor Directives
   17.8.4 Deprecation of Format Function Conversion Specifiers
   17.8.5 Deprecation of Templates
  17.9 Parallel Analysis
  17.10 Language Limits
  17.11 Diagnostic Accounting
   17.11.1 The Diagnostics table
   17.11.2 The Options table
   17.11.3 The Suppressions table
   17.11.4 The Orbits table
   17.11.5 The Modules table
   17.11.6 The Files table
   17.11.7 The Metadata table
   17.11.8 Understanding why a message is suppressed/emitted
  17.12 Unused Suppressions
   17.12.1 Prerequisites
   17.12.2 Optional Dependencies
   17.12.3 Usage
   17.12.4 Output Categories
   17.12.5 Suppressing Suppressions
   17.12.6 Peak Memory Usage
  17.13 Call Graph

18 Preprocessor 18.1 Preprocessor Symbols
  18.2 #include Processing
   18.2.1 INCLUDE Environment Variable
  18.3 ANSI/ISO Preprocessor Facilities
   18.3.1 #line and #
  18.4 Non-Standard Preprocessing
   18.4.1 #import
   18.4.2 #include_next
   18.4.3 #ident
   18.4.4 #sccs
   18.4.5 #warning
  18.5 User-Defined Keywords
  18.6 Preprocessor sizeof

19 Living with Lint 19.1 An Example of a Policy
  19.2 Recommended Setup
  19.3 Final Thoughts

20 Common Issues 20.1 Syntax errors when using Boost
  20.2 Suppressing MISRA/AUTOSAR/CERT C/CWE messages from library/system headers
  20.3 Standard C++ keywords not recognized when using au-misra-cpp.lnt
  20.4 Running pclp_config from Windows produces errors or no result
  20.5 Resolving error 309 (#error directive encountered)
  20.6 Resolving error 330 (static assert failed)
  20.7 Resolving errors 305 (unable to open module) and 307 (unable to open indirect file)
  20.8 Syntax errors when using options that contain spaces
  20.9 Resolving error 322 (unable to open include file)
  20.10 Syntax errors when using options containing parentheses on the command prompt

21 Frequently Asked Questions 21.1 How do I keep PC-lint Plus from processing header files?
  21.2 When do I need to use imposter?
  21.3 How should imposter be compiled?
  21.4 What can I do to improve analysis speed?
  21.5 PC-lint Plus has crashed, what do I do next?
  21.6 Why isn’t my option working?
  21.7 How can I temporarily disable suppressions of one or more messages?
  21.8 How can I customize existing messages or add new messages?
  21.9 How can I change the message category associated with a message?
  21.10 How can I generate XML/HTML output?
  21.11 Can PC-lint Plus generate custom reports?
  21.12 Where can I find msg.txt / msg.json?
  21.13 How can I apply options only to C files but not C++ files (or vice versa)?
  21.14 Can PC-lint Plus recursively scan sub directories for the source code?
  21.15 Can function semantics be applied using attribute
syntax?


22 Messages 22.1 Message Parameters
  22.2 Messages 1-999
   22.2.1 Messages 1-99
   22.2.2 Messages 100-199
   22.2.3 Messages 300-399
   22.2.4 Messages 400-499
   22.2.5 Messages 500-599
   22.2.6 Messages 600-699
   22.2.7 Messages 700-799
   22.2.8 Messages 800-899
   22.2.9 Messages 900-999
  22.3 Messages 1000-1999
   22.3.1 Messages 1000-1099
   22.3.2 Messages 1100-1199
   22.3.3 Messages 1300-1399
   22.3.4 Messages 1400-1499
   22.3.5 Messages 1500-1599
   22.3.6 Messages 1700-1799
   22.3.7 Messages 1800-1899
   22.3.8 Messages 1900-1999
  22.4 Messages 2000-2999
   22.4.1 Messages 2000-2099
   22.4.2 Messages 2400-2499
   22.4.3 Messages 2500-2599
   22.4.4 Messages 2600-2699
   22.4.5 Messages 2700-2799
   22.4.6 Messages 2800-2899
   22.4.7 Messages 2900-2999
  22.5 Messages 3000-3999
   22.5.1 Messages 3400-3499
   22.5.2 Messages 3500-3599
   22.5.3 Messages 3700-3799
   22.5.4 Messages 3900-3999
  22.6 Messages 4000-6999
  22.7 Messages 8000-8999
   22.7.1 Messages 8000-8099
  22.8 Messages 9000-9999
   22.8.1 Messages 9000-9099
   22.8.2 Messages 9100-9199
   22.8.3 Messages 9200-9299
   22.8.4 Messages 9300-9399
   22.8.5 Messages 9400-9499
   22.8.6 Messages 9500-9599
   22.8.7 Messages 9900-9999

23 Revision History 23.1 Version 2025 SP1
   23.1.1 Highlights
   23.1.2 Summary
   23.1.3 New Features
   23.1.4 Improvements
   23.1.5 Bugs Fixed
   23.1.6 Known Issues
  23.2 Version 2025
   23.2.1 Highlights
   23.2.2 Summary
   23.2.3 New Features
   23.2.4 Improvements
   23.2.5 Bugs Fixed
   23.2.6 Known Issues
  23.3 Version 2.2
   23.3.1 Highlights
   23.3.2 Summary
   23.3.3 New Features
   23.3.4 Improvements
   23.3.5 Bugs Fixed
   23.3.6 Known Issues
  23.4 Version 2.1
   23.4.1 Highlights
   23.4.2 Summary
   23.4.3 New Features
   23.4.4 Improvements
   23.4.5 Bugs Fixed
   23.4.6 Known Issues
  23.5 Version 2.0
   23.5.1 Highlights
   23.5.2 Summary
   23.5.3 New Features
   23.5.4 Improvements
   23.5.5 Bugs Fixed
   23.5.6 Known Issues
   23.5.7 Changes to Beta Functionality Since Version 2.0 Beta 3
  23.6 Version 1.4.1
   23.6.1 Summary
  23.7 Version 1.4
   23.7.1 Summary
  23.8 Version 1.3.5
   23.8.1 Summary
  23.9 Version 1.3
   23.9.1 Summary
  23.10 Version 1.2
   23.10.1 Summary
  23.11 Version 1.1
   23.11.1 Summary

24 Open Source Declarations
25 Acknowledgements
  25.1 Carnegie Mellon University
  25.2 MITRE Corporation

26 Bibliography