Sun WorkShop Compiler C 5.0 User's Guide

-Ncheck=c

Checks header files for corresponding declarations; checks macros. c is a comma-separated list of checks that consists of one or more of the following: macro, extern, %all, %none, no%macro, no%extern.

Table 5-4 The -Ncheck Values

Value 

Meaning 

macro

Checks for consistency of macro definitions across files 

extern

Checks for one-to-one correspondence of declarations between source files and their associated header files (for example, for file1.c and file1.h). Ensure that there are neither extraneous nor missing extern declarations in a header file.

%all

Performs all of -Ncheck's checks

%none

Performs none of -Ncheck's checks. This is the default.

no%macro

Performs none of -Ncheck's macro checks

no%extern

Performs none of -Ncheck's extern checks

The default is -Ncheck=%none. Specifying -Ncheck is equivalent to specifying -Ncheck=%all.

Values may be combined with a comma, for example, -Ncheck=extern,macro.

Example:

% lint -Ncheck=%all,no%macro

performs all checks except macro checks.