ack/doc/lint/chap6
1991-09-30 17:58:00 +00:00

108 lines
2 KiB
Plaintext

.NH 1
User options
.PP
.I Lint
recognizes the following command line flags.
Some of them are identical to the flags of
.I cem.
.I Lint
warns for flags it doesn't know.
.LP
\f(CW-D<name>
.br
-D<name>=<text>\fP
.br
.in 5
Causes \f(CW<name>\fP to be defined as a macro.
The first form is equivalent to `\f(CW-D<name>=1\fP'.
The second form is equivalent to putting `\f(CW#define <name> <text>\fP'
in front of all the source files.
.in
.LP
\f(CW-U<name>\fP
.br
.in 5
Acts as if the line `\f(CW#undef <name>\fP' is put in front of all
the source files.
.in
.LP
\f(CW-I<directory>\fP
.br
.in 5
This puts \f(CW<directory>\fP in the include directory
list.
.in
.LP
\f(CW-R\fP
.br
.in 5
Turn off the `strict' option.
Default
.I lint
checks the program according to the Reference Manual, because this
gives a definition of the language with which there is a better chance
of writing portable programs.
With this flag on, some constructs, otherwise not allowed, are
accepted.
.in
.LP
\f(CW-l<name>
.br
-llib-l<name>.ln
.br
-l\fP
.br
.in 5
`\f(CW-l<name>\fP' tells
.I lint
to search the lint library
\f(CWllib-l<name>.ln\fP for missing
definitions of functions and variables.
The option `\f(CW-llib-l<name>.ln\fP' makes
.I lint
search the lint library file \f(CWllib-l<name>.ln\fP in the current
directory for missing definitions.
Default is `\f(CW-lc\fP'; this default can be suppressed by
`\f(CW-l\fP'.
.in
.LP
\f(CW-a\fP
.br
.in 5
Warn for conversions from integer to long and vice versa.
.in
.LP
\f(CW-b\fP
.br
.in 5
Don't report not-reachable break statements.
This flag is useful for running
.I lint
on a \fIlex\fP- or \fIyacc\fP-generated source file.
.in
.LP
\f(CW-h\fP
.br
.in 5
Check for useless statements and possible pointer alignment problems.
.in
.LP
\f(CW-n\fP
.br
.in 5
Don't complain about unused and undefined functions and variables.
.in
.LP
\f(CW-v\fP
.br
.in 5
Don't warn about unused arguments of functions.
.in
.LP
\f(CW-x\fP
.br
.in 5
Complain about unused external variables.
.in
.bp