Pristine Ack-5.5
[Ack-5.5.git] / doc / lint / chap1
1 .NH 1
2 Introduction
3 .PP
4 C [1][2] is a dangerous programming language.
5 The programmer is allowed to do almost anything, as long as
6 the syntax of the program is correct.
7 This has a reason. In this way it is possible to make a fast
8 compiler which produces fast code.
9 The compiler will be fast because it doesn't do much checking
10 at compile time.
11 The code is fast because the compiler doesn't generate run time
12 checks.
13 The programmer should protect himself against producing error
14 prone code.
15 One way to do that is to obey the
16 .I
17 Ten Commandments for C programmers
18 .R
19 [appendix B].
20 This document describes an implementation of the
21 .I lint
22 program, as referred to in Commandment 1.
23 It is a common error to run
24 .I lint
25 only after a few hours of debugging and some
26 bug can't be found.
27 .I Lint
28 should be run when large pieces of new code are accepted by the
29 compiler and as soon as bugs arise.
30 Even for working programs it is useful to run
31 .I lint,
32 because it can find constructions that may lead to problems in 
33 the future.
34 .bp