Preventing Errors & Bugs

## Preventing Errors & Warnings

The Carbide C/C++ compiler generates errors when it cannot translate your source code or generate object code due to improper syntax.

Like the lint programming utility, the Carbide C/C++ compiler can generate warnings that alert you to source code that is syntactically correct but logically incorrect or ambiguous. Because these warnings are not fatal, the compiler still translates your source code. However, your program might not run as you intended.

This section describes these warnings:

- Warnings as Errors
- Illegal Pragmas
- Empty Declarations
- Common Errors
- Unused Variables
- Unused Arguments
- Extra Commas
- Suspicious Assignments and Incorrect Function Returns
- Hidden Virtual Functions
- Implicit Arithmetic Conversions
- inline Functions That Are Not Inlined
- Mixed Use of ‘class’ and ‘struct’ Keywords
- Redundant Statements
- Realigned Data Structures
- Ignored Function Results
- Bad Conversions of Pointer Value