2 Ideas for further development
4 Although the program in its current state is a useful program,
5 there are still a lot of features that should be implemented
7 I'll summarize them in this section.
9 Actually the program consists of three passes.
12 is a complete pass, just as the first and the second pass.
13 I think we speed up the program by removing the filter and making
14 the second pass accept an unsorted file.
15 The sorting process can be done in parallel to the first pass if
16 both processes communicate through a pipe.
17 In addition to this sorting, the second pass can generate already
19 (Warnings like \f(CW%s defined but never used\fP can only be
20 generated after having processed all the input.)
21 These warnings generated in parallel to the warnings of the first pass,
22 should be sent to an intermediate file, otherwise the warnings would
24 Such an improvement will have best effect on a multi processing
25 machine, but even on single processing machines this will give a better
26 performance. (On a single processing machine the pipe should be
27 replaced by an intermediate file.)
29 Expressions could be classified so
31 can warn for some classes of expressions in strange contexts.
32 Suppose as class <boolean>.
33 \f(CWb\fP Will be of class <boolean> if e.g. \f(CWb\fP is assigned to
34 the expression \f(CW<ex1> || <ex2>\fP.
35 The following expression should then give a warning
38 b + i; /* weird expression */
42 A mechanism to check printf like routines.
43 This mechanism should verify the format string against the following
45 There is a public domain program that can be used to do this job.
46 It is called printfck and should be used as a filter between the
50 Raise warnings for incomplete initializer lists like
53 int a[10] = {0, 1, 2};
54 /* initializer list not complete */
58 Warnings for constructs like
61 for (i = 0; i < 10; i++) {
64 /* loop control variable affected */
73 /* statements in which the value
74 * of var is never changed
77 /* loop control variable not updated */
81 A warning \f(CWbad layout\fP for program fragments like
92 A warning \f(CWassignment in conditional context\fP in case of
99 The programmer probably meant \f(CWif (a == b)\fP.
100 No warning should be given for \f(CWif ((a = b) != c)\fP,
101 nor for \f(CWif ((a = b))\fP.
103 Warnings for empty statements in strange contexts, like
106 if (cond); /* mistake */
111 (This mistake would also be detected by a warning \f(CWbad layout\fP.)
113 A mechanism to prevent the warning \f(CWpossible pointer alignment
114 problem\fP for functions of which the programmer already knows that
115 no problem will arise.
116 E.g. for functions like malloc and family.
118 The current version of
120 warns for conversions from long to int (if -a flag is
122 It even warns if the programmer used the proper cast, as e.g.
135 The explicit cast indicates that the programmer knows what he is
137 This feature is not implemented because the expression tree doesn't
138 show if the cast was implicit or explicit.