Pristine Ack-5.5
[Ack-5.5.git] / doc / lint / chap6
1 .NH 1
2 User options
3 .PP
4 .I Lint
5 recognizes the following command line flags.
6 Some of them are identical to the flags of
7 .I cem.
8 .I Lint
9 warns for flags it doesn't know.
10 .LP
11 \f(CW-D<name>
12 .br
13 -D<name>=<text>\fP
14 .br
15 .in 5
16 Causes \f(CW<name>\fP to be defined as a macro.
17 The first form is equivalent to `\f(CW-D<name>=1\fP'.
18 The second form is equivalent to putting `\f(CW#define <name> <text>\fP'
19 in front of all the source files.
20 .in
21 .LP
22 \f(CW-U<name>\fP
23 .br
24 .in 5
25 Acts as if the line `\f(CW#undef <name>\fP' is put in front of all
26 the source files.
27 .in
28 .LP
29 \f(CW-I<directory>\fP
30 .br
31 .in 5
32 This puts \f(CW<directory>\fP in the include directory
33 list.
34 .in
35 .LP
36 \f(CW-R\fP
37 .br
38 .in 5
39 Turn off the `strict' option.
40 Default
41 .I lint
42 checks the program according to the Reference Manual, because this
43 gives a definition of the language with which there is a better chance
44 of writing portable programs.
45 With this flag on, some constructs, otherwise not allowed, are
46 accepted.
47 .in
48 .LP
49 \f(CW-l<name>
50 .br
51 -llib-l<name>.ln
52 .br
53 -l\fP
54 .br
55 .in 5
56 `\f(CW-l<name>\fP' tells 
57 .I lint
58 to search the lint library
59 \f(CWllib-l<name>.ln\fP for missing
60 definitions of functions and variables.
61 The option `\f(CW-llib-l<name>.ln\fP' makes
62 .I lint
63 search the lint library file \f(CWllib-l<name>.ln\fP in the current
64 directory for missing definitions.
65 Default is `\f(CW-lc\fP'; this default can be suppressed by
66 `\f(CW-l\fP'.
67 .in
68 .LP
69 \f(CW-a\fP
70 .br
71 .in 5
72 Warn for conversions from integer to long and vice versa.
73 .in
74 .LP
75 \f(CW-b\fP
76 .br
77 .in 5
78 Don't report not-reachable break statements.
79 This flag is useful for running
80 .I lint
81 on a \fIlex\fP- or \fIyacc\fP-generated source file.
82 .in
83 .LP
84 \f(CW-h\fP
85 .br
86 .in 5
87 Check for useless statements and possible pointer alignment problems.
88 .in
89 .LP
90 \f(CW-n\fP
91 .br
92 .in 5
93 Don't complain about unused and undefined functions and variables.
94 .in
95 .LP
96 \f(CW-v\fP
97 .br
98 .in 5
99 Don't warn about unused arguments of functions.
100 .in
101 .LP
102 \f(CW-x\fP
103 .br
104 .in 5
105 Complain about unused external variables.
106 .in
107 .bp