|
|
1.1 root 1: .TH LINT 1
2: .CT 1 prog_c
3: .SH NAME
4: lint, cyntax, cem \- C program verifiers
5: .SH SYNOPSIS
6: .B lint
7: [
8: .B -abchnpuvx
9: ] [
10: .I option ...
11: ]
12: .I file ...
13: .PP
14: .B cyntax
15: [
16: .I option ...
17: ]
18: .I file ...
19: .PP
20: .B /usr/lib/cyntax/cem
21: [
22: .I option ...
23: ]
24: .I file ...
25: .SH DESCRIPTION
26: .I Lint
27: checks, more thoroughly than
28: .IR cc (1),
29: the syntactic validity and semantic consistency of
30: one or more C program
31: .I files.
32: It is assumed that all the
33: .I files
34: are to be loaded together; they are checked for
35: mutual compatibility.
36: Function definitions for certain libraries are available to
37: .IR lint ;
38: these libraries are referred to by a
39: conventional name,
40: such as
41: .LR -lm ,
42: in the style of
43: .IR ld (1).
44: .PP
45: Any number of the option letters in the following list
46: may be used.
47: The
48: .BR -D ,
49: .BR -U ,
50: and
51: .B -I
52: options of
53: .IR cc (1)
54: are also recognized as separate arguments.
55: .TP
56: .B p
57: Attempt to check portability to some other
58: dialects of C.
59: .PD 0
60: .TP
61: .B h
62: Apply heuristics to
63: intuit bugs, improve style, and reduce waste.
64: .TP
65: .B b
66: Report
67: .I break
68: statements that cannot be reached.
69: .TP
70: .B v
71: Suppress complaints about unused arguments in functions.
72: .TP
73: .B x
74: Report variables referred to by extern declarations,
75: but never used.
76: .TP
77: .B a
78: Report assignments of long values to int variables.
79: .TP
80: .B c
81: Complain about casts which have questionable portability.
82: .TP
83: .B u
84: Do not complain about functions and variables used and not
85: defined, or defined and not used (this is suitable for running
86: .I lint
87: on a subset of files out of a larger program).
88: .TP
89: .B n
90: Do not check compatibility against the standard library.
91: .PD
92: .PP
93: Certain conventional comments in the C source
94: will change the behavior of
95: .IR lint :
96: .TP
97: .B /*NOTREACHED*/
98: at appropriate points.
99: Stop comments about unreachable code.
100: .PD 0
101: .TP
102: .BI /*VARARGS n */
103: Suppress
104: the usual checking for variable numbers of arguments
105: in the following function declaration.
106: The data types of the first
107: .I n
108: arguments are checked;
109: a missing
110: .I n
111: is taken to be 0.
112: .TP
113: .BI /*PRINTFLIKE n */
114: The data types of the first
115: .I n\^
116: arguments are checked as usual.
117: The remaining arguments are
118: checked
119: against the
120: .IR n th
121: argument, which is interpreted as a
122: .IR printf (3)
123: format string.
124: .TP
125: .BI /*SCANFLIKE n */
126: Similarly for
127: .IR scanf (3).
128: .TP
129: .B /*NOSTRICT*/
130: Shut off strict type checking in the next expression.
131: .TP
132: .B /*ARGSUSED*/
133: Turn on the
134: .B -v
135: option for the next function.
136: .TP
137: .B /*LINTLIBRARY*/
138: at the beginning of a file. Shut off complaints about
139: unused functions in this file.
140: .PD
141: .PP
142: .I Cyntax
143: makes checks similar to those of
144: .I lint,
145: more stringent about syntax, less observant of portability issues.
146: It keeps type information gleaned from source files,
147: whose names end with
148: .LR .c ,
149: in `object files' with corresponding names ending in
150: .LR .O .
151: If all goes well it will cross check among all the
152: .L .c
153: and
154: .L .O
155: input
156: .I files.
157: .PP
158: Options
159: .BR -D ,
160: .BR -I ,
161: .BR -U ,
162: .BR -o ,
163: .BR -l
164: are as in
165: .IR cc (1).
166: Options
167: .BR -O ,
168: .BR -P ,
169: .BR -g ,
170: .BR -p ,
171: and
172: .BR -s
173: are ignored.
174: Other options are:
175: .TP
176: .B -c
177: Suppress cross checking.
178: .PD 0
179: .TP
180: .B -d
181: Passed to
182: .IR cem .
183: .TP
184: .B -h
185: Base object files on the basename of the source file
186: rather than the full pathname.
187: .TP
188: .B -n
189: Do not check compatibility against the standard library.
190: .TP
191: .B -G
192: Change default directory of include files to
193: .FR /usr/2include ,
194: pass
195: .B -lg
196: to
197: .I cem
198: instead of
199: .BR -lc .
200: .TP
201: .B -j
202: Change default directory of include files to
203: .FR /usr/jerq/include ,
204: pass
205: .B -lj
206: to
207: .I cem
208: instead of
209: .BR -lc .
210: .TP
211: .B -k
212: Change default directory of include files to
213: .FR /usr/ninclude ,
214: pass
215: .B -lk
216: to
217: .I cem
218: instead of
219: .BR -lc .
220: .TP
221: .B -w
222: Enable pedantic warning diagnostics.
223: .TP
224: .B -m
225: equivalent to
226: .LR "-j -DMUX" .
227: .TP
228: .B -v
229: Report what
230: .I cyntax
231: is actually doing.
232: .TP
233: .BI -V func : n
234: Declare function
235: .I func
236: to have a variable number of arguments, the first
237: .I n
238: of which are to be type checked.
239: .PD
240: .PP
241: .I Cem
242: (cemantics), the cross-checker, is normally invoked only by
243: .IR cyntax .
244: It also has options, some of which
245: .I cyntax
246: can't be coerced into providing.
247: Besides
248: .B -o
249: and
250: .BR -l ,
251: they are:
252: .TP
253: .B -m
254: Don't believe file modification times.
255: These are normally used to avert redundant type checking.
256: .PD0
257: .TP
258: .B -d
259: Debug: print ascii version of
260: .L .O
261: files on standard output.
262: .TP
263: .B -p
264: Be pedantic about type checking.
265: .TP
266: .B -t
267: Unconditionally include file modification times in diagnostics.
268: .TP
269: .B -v
270: Use a verbose format for type names.
271: .PD
272: .SH FILES
273: .TF /usr/lib/lint/llib-port
274: .TP
275: .F /usr/lib/lint/lint[12]
276: programs
277: .TP
278: .F /usr/lib/lint/llib-lc
279: declarations for standard functions
280: .TP
281: .F /usr/lib/lint/llib-lport
282: declarations for portable functions
283: .TP
284: .F /usr/include/*
285: .TP
286: .F /usr/lib/cyntax/ccom
287: cyntax proper
288: .TP
289: .F /usr/lib/cyntax/libc
290: type library
291: .TP
292: .F /usr/lib/cyntax/libj
293: .SH SEE ALSO
294: .IR cc (1),
295: .IR cin (1)
296: .SH BUGS
297: .IR Exit (2)
298: and other functions which do not return
299: are not understood by
300: .IR lint ;
301: this causes various lies.
302: .br
303: The unnatural default setting of
304: .I lint
305: option
306: .B -b
307: is intended to hide the ugliness of
308: C code produced by
309: .IR yacc (1)
310: and
311: .IR lex (1).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.