]> andersk Git - splint.git/blob - src/flags.def
6b616e61f8c36dcc10bfae5b3b05963a94deb870
[splint.git] / src / flags.def
1 /*;-*-C-*-; 
2 **
3 ** flags.def
4 **
5 ** This file is used to generate the flag header files.
6 **
7 ** Don't forget to regenerate flag_codes.gen. (lost the Makefile...bleech!)
8 */
9                              /* spec   idem   global  mode  args */
10 /*@-namechecks@*/
11 /*@notfunction@*/
12 # define modeFlag               FALSE, FALSE, FALSE,  TRUE, ARG_NONE
13 /*@notfunction@*/
14 # define plainFlag              FALSE, FALSE, FALSE, FALSE, ARG_NONE
15 /*@notfunction@*/
16 # define specialFlag            TRUE,  FALSE, FALSE, FALSE, ARG_NONE
17 /*@notfunction@*/
18 # define plainSpecialFlag       TRUE,  FALSE, FALSE, FALSE, ARG_NONE
19 /*@notfunction@*/
20 # define idemSpecialFlag        TRUE,  TRUE,  FALSE, FALSE, ARG_NONE
21 /*@notfunction@*/
22 # define valueFlag              FALSE, FALSE, FALSE, FALSE, ARG_NUMBER
23
24 /*@notfunction@*/
25 # define charFlag               FALSE, FALSE, FALSE, FALSE, ARG_CHAR
26
27 /*@notfunction@*/
28 # define modeValueFlag          FALSE, FALSE, FALSE, TRUE,  ARG_NUMBER
29 /*@notfunction@*/
30 # define specialValueFlag       TRUE,  FALSE, FALSE, FALSE, ARG_NUMBER
31 /*@notfunction@*/
32 # define debugFlag              FALSE, TRUE,  FALSE, FALSE, ARG_NONE
33 /*@notfunction@*/
34 # define debugValueFlag         FALSE, TRUE,  FALSE, FALSE, ARG_NUMBER
35 /*@notfunction@*/
36 # define specialDebugFlag       TRUE,  TRUE,  FALSE, FALSE, ARG_NONE
37 /*@notfunction@*/
38 # define globalFlag             FALSE, FALSE, TRUE,  FALSE, ARG_NONE
39 /*@notfunction@*/
40 # define idemGlobalFlag         FALSE, TRUE,  TRUE,  FALSE, ARG_NONE
41 /*@notfunction@*/
42 # define globalValueFlag        FALSE, FALSE, TRUE,  FALSE, ARG_NUMBER
43
44 /* Note: type argument missing */ 
45 /*@notfunction@*/
46 # define regStringFlag          FALSE, FALSE, FALSE, FALSE
47 /*@notfunction@*/
48 # define idemStringFlag         FALSE, TRUE,  FALSE, FALSE
49 /*@notfunction@*/
50 # define globalStringFlag       FALSE, FALSE, TRUE,  FALSE
51
52 /*@notfunction@*/
53 # define extraArgFlag           FALSE, FALSE, FALSE, FALSE, ARG_SPECIAL
54 /*@notfunction@*/
55 # define globalExtraArgFlag     FALSE, FALSE, TRUE,  FALSE, ARG_SPECIAL
56 /*@notfunction@*/
57 # define globalFileFlag         FALSE, TRUE,  TRUE,  FALSE, ARG_FILE
58 /*@=namechecks@*/
59
60 /*
61 ** Note: the flag code must be on a separate line, since I'm
62 ** too stupid to write an awk/sed/whatever script that can separate
63 ** the lines.
64 */
65
66 static flaglist flags = 
67 {       
68   /*
69   ** Null Dereferences (Manual Section 2)
70   */
71
72   {
73     FK_NULL, FK_MEMORY, specialFlag,
74     "null",
75     FLG_NULL,
76     "misuses of null pointer",
77     "A possibly null pointer is misused (sets nullderef, nullpass, "
78     "nullref, nullassign, and nullstate).",
79     0, 0
80   },
81   {
82     FK_NULL, FK_MEMORY, modeFlag,
83     "nullderef",
84     FLG_NULLDEREF,
85     "possible dereferencce of null pointer",
86     "A possibly null pointer is dereferenced.  Value is "
87     "either the result of a function which may return null "
88     "(in which case, code should check it is not null), or a "
89     "global, parameter or structure field declared with the "
90     "null qualifier.",
91     0, 0
92   },
93   {
94     FK_NULL, FK_MEMORY, modeFlag,
95     "nullpass",
96     FLG_NULLPASS,
97     "possibly null pointer passed as formal with no null annotation",
98     "A possibly null pointer is passed as a parameter corresponding to "
99     "a formal parameter with no /*@null@*/ annotation.  If NULL "
100     "may be used for this parameter, add a /*@null@*/ annotation "
101     "to the function parameter declaration.",
102     0, 0
103   },
104   {
105     FK_NULL, FK_MEMORY, modeFlag,
106     "nullret",
107     FLG_NULLRET,
108     "possibly null pointer returned as result with no null annotation",
109     "Function returns a possibly null pointer, but is not declared "
110     "using /*@null@*/ annotation of result.  If function may "
111     "return NULL, add /*@null@*/ annotation to the return "
112     "value declaration.",
113     0, 0
114   },
115   {
116     FK_NULL, FK_MEMORY, modeFlag,
117     "nullstate",
118     FLG_NULLSTATE,
119     "possibly null pointer reachable from a reference with no null annotation",
120     "A possibly null pointer is reachable from a parameter or global "
121     "variable that is not declared using a /*@null@*/ annotation.",
122     0, 0
123   },
124   {
125     FK_NULL, FK_MEMORY, modeFlag,
126     "nullassign",
127     FLG_NULLASSIGN,
128     "inconsistent assignment or initialization involving null pointer",
129     "A reference with no null annotation is assigned or initialized "
130     "to NULL.  Use /*@null@*/ to declare the reference as "
131     "a possibly null pointer.",
132     0, 0
133   },
134   {
135     FK_NULL, FK_MEMORY, plainFlag,
136     "nullinit",
137     FLG_NULLINIT,
138     "inconsistent initialization involving null pointer",
139     "A reference with no null annotation is initialized "
140     "to NULL.  Use /*@null@*/ to declare the reference as "
141     "a possibly null pointer.",
142     0, 0
143   },
144
145   /*
146   ** Undefined Values (Section 3)
147   */
148
149   {
150     FK_DEF, FK_NONE, modeFlag,
151     "usedef",
152     FLG_USEDEF,
153     "use before definition",
154     "An rvalue is used that may not be initialized to a value on some execution path.",
155     0, 0
156   },
157   {
158     FK_MEMORY, FK_DEF, modeFlag,
159     "mustdefine",
160     FLG_MUSTDEFINE,
161     "out storage not defined before return or scope exit",
162     "An out parameter or global is not defined before control is transferred.",
163     0, 0
164   },
165   {
166     FK_MEMORY, FK_DEF, modeFlag,
167     "uniondef",
168     FLG_UNIONDEF,
169     "at least one field of a union must be defined",
170     "No field of a union is defined. Generally, one field of a union is "
171     "expected to be defined.",
172     0, 0
173   },
174   {
175     FK_MEMORY, FK_DEF, modeFlag,
176     "compdef",
177     FLG_COMPDEF,
178     "parameter, return value or global completely defined",
179     "Storage derivable from a parameter, return value or global is "
180     "not defined. Use /*@out@*/ to denote passed or returned "
181     "storage which need not be defined.",
182     0, 0
183   },
184   {
185     FK_DEF, FK_NONE, plainFlag,
186     "fullinitblock",
187     FLG_FULLINITBLOCK,
188     "initializer sets all fields",
189     "Initializer does not set every field in the structure.",
190     0, 0
191   },
192   {
193     FK_DEF, FK_NONE, plainFlag,
194     "initallelements",
195     FLG_INITALLELEMENTS,
196     "initializer defines all array elements",
197     "Initializer does not define all elements of a declared array.",
198     0, 0
199   },
200   {
201     FK_DEF, FK_NONE, plainFlag,
202     "initsize",
203     FLG_INITSIZE,
204     "initializer defines extra array elements",
205     "Initializer block contains more elements than the size of a declared array.",
206     0, 0
207   },
208
209   {
210     FK_DEF, FK_IMPLICIT, modeFlag,
211     "impouts",
212     FLG_IMPOUTS,
213     "pointer parameters to unspecified functions may be implicit out parameters",
214     NULL, 0, 0
215   },
216
217   /*
218   ** Types (Section 4)
219   */
220
221   {
222     FK_DECL, FK_TYPE, modeFlag,
223     "incondefs",
224     FLG_INCONDEFS,
225     "function, variable or constant redefined with inconsistent type",
226     "A function, variable or constant is redefined with a different type.",
227     0, 0
228   },
229   {
230     FK_DECL, FK_TYPE, modeFlag,
231     "matchfields",
232     FLG_MATCHFIELDS,
233     "struct or enum type redefined with inconsistent fields or members",
234     "A struct, union or enum type is redefined with inconsistent fields or members.",
235     0, 0
236   },
237   {
238     FK_TYPE, FK_NONE, modeFlag,
239     "fcnderef",
240     FLG_FCNDEREF,
241     "dereferencce of a function type",
242     "A function type is dereferenced.  The ANSI standard allows this "
243     "because of implicit conversion of function designators, however the "
244     "dereference is unnecessary.", 
245     0, 0
246   },
247   {
248     FK_OPS, FK_NONE, modeFlag,
249     "realcompare",
250     FLG_REALCOMPARE,
251     "dangerous equality comparison between reals (dangerous because of inexact "
252     "floating point representations)",
253     "Two real (float, double, or long double) values are compared "
254     "directly using == or != primitive. "
255     "This may produce unexpected results since floating point "
256     "representations are inexact. Instead, compare the difference to "
257     "FLT_EPSILON or DBL_EPSILON.",
258     0, 0,
259   },
260   {
261     FK_OPS, FK_NONE, modeFlag,
262     "realrelatecompare",
263     FLG_REALRELATECOMPARE,
264     "possibly dangerous relational comparison between reals (dangerous because of inexact "
265     "floating point representations)",
266     "Two real (float, double, or long double) values are compared "
267     "directly using < or >. "
268     "This may produce unexpected results since floating point "
269     "representations are inexact. Instead, compare the difference to "
270     "FLT_EPSILON or DBL_EPSILON.",
271     0, 0,
272   },
273   {
274     FK_OPS, FK_NONE, modeFlag,
275     "unsignedcompare",
276     FLG_UNSIGNEDCOMPARE,
277     "comparison using <, <=, >= between an unsigned integral and zero constant",
278     "An unsigned value is used in a comparison with zero in a way that is either a bug or confusing.",
279     0, 0,
280   },
281   {
282     FK_OPS, FK_POINTER, modeFlag,
283     "ptrarith",
284     FLG_POINTERARITH,
285     "arithmetic involving pointer and integer",
286     "Pointer arithmetic using pointer and integer.", 0, 0
287   },
288   {
289     FK_OPS, FK_POINTER, modeFlag,
290     "nullptrarith",
291     FLG_NULLPOINTERARITH,
292     "arithmetic involving possibly null pointer and integer",
293     "Pointer arithmetic using a possibly null pointer and integer.", 0, 0
294   },
295   {
296     FK_OPS, FK_POINTER, modeFlag,
297     "ptrcompare",
298     FLG_PTRNUMCOMPARE,
299     "comparison between pointer and number",
300     "A pointer is compared to a number.", 0, 0
301   },
302   {
303     FK_OPS, FK_TYPE, modeFlag,
304     "strictops",
305     FLG_STRICTOPS,
306     "primitive operation does not type check strictly",
307     "A primitive operation does not type check strictly.", 0, 0
308   },
309   {
310     FK_OPS, FK_TYPE, modeFlag,
311     "bitwisesigned",
312     FLG_BITWISEOPS,
313     "a bitwise logical operator does not have unsigned operands",
314     "An operand to a bitwise operator is not an unsigned values.  This "
315     "may have unexpected results depending on the signed "
316     "representations.", 0, 0
317   },
318   {
319     FK_OPS, FK_TYPE, modeFlag,
320     "shiftnegative",
321     FLG_SHIFTNEGATIVE,
322     "a shift right operand may be negative",
323     "The right operand to a shift operator may be negative (behavior undefined).",
324     0, 0
325   },
326   {
327     FK_OPS, FK_TYPE, modeFlag,
328     "shiftimplementation",
329     FLG_SHIFTIMPLEMENTATION,
330     "a shift left operand may be negative",
331     "The left operand to a shift operator may be negative (behavior is implementation-defined).",
332     0, 0
333   },
334   {
335     FK_OPS, FK_TYPE, modeFlag,
336     "sizeoftype",
337     FLG_SIZEOFTYPE,
338     "sizeof operator has a type argument",
339     "Operand of sizeof operator is a type. (Safer to use expression, "
340     "int *x = sizeof (*x); instead of sizeof (int).)", 
341     0, 0
342   },
343   {
344     FK_OPS, FK_TYPE, plainFlag,
345     "sizeofformalarray",
346     FLG_SIZEOFFORMALARRAY,
347     "sizeof operator has an array formal parameter argument",
348     "Operand of a sizeof operator is a function parameter declared as "
349     "an array.  The value of sizeof will be the size of a pointer to the "
350     "element type, not the number of elements in the array.",
351     0, 0
352   },
353   {
354     FK_DECL, FK_TYPE, plainFlag,
355     "fixedformalarray",
356     FLG_FIXEDFORMALARRAY,
357     "formal parameter of type array is declared with size",
358     "A formal parameter is declared as an array with size.  The size of the array "
359     "is ignored in this context, since the array formal parameter is treated "
360     "as a pointer.",
361     0, 0
362   },
363   {
364     FK_DECL, FK_TYPE, plainFlag,
365     "incompletetype",
366     FLG_INCOMPLETETYPE,
367     "formal parameter has an incomplete type",
368     "A formal parameter is declared with an incomplete type.",
369     0, 0
370   },
371   {
372     FK_DECL, FK_TYPE, plainFlag,
373     "formalarray",
374     FLG_FORMALARRAY,
375     "formal parameter is an array",
376     "A formal parameter is declared as an array.  This can be confusing, since "
377     "a formal array parameter is treated as a pointer.",
378     0, 0
379   },
380
381
382   /*
383   ** Booleans (4.2)
384   */
385
386   {
387     FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
388     "booltype",
389     FLG_BOOLTYPE,
390     "set name of boolean type (default bool)",
391     NULL, 0, 0
392   },
393   {
394     FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
395     "boolfalse",
396     FLG_BOOLFALSE,
397     "set name of boolean false (default false)",
398     NULL, 0, 0
399   },
400   {
401     FK_BOOL, FK_NONE, regStringFlag, ARG_STRING,
402     "booltrue",
403     FLG_BOOLTRUE, 
404     "set name of boolean true (default true)",
405     NULL, 0, 0
406   },
407   {
408     FK_BOOL, FK_HELP, plainFlag,
409     "likelybool",
410     FLG_LIKELYBOOL,
411     "type name is probably a boolean type but does not match default "
412     "boolean type name, \"bool\", and alternate name is not set",
413     "Use the -booltype, -boolfalse and -booltrue flags to change the "
414     "name of the default boolean type.",
415     0, 0
416   },
417
418   {
419     FK_BOOL, FK_OPS, modeFlag,
420     "boolcompare",
421     FLG_BOOLCOMPARE,
422     "comparison between bools (dangerous because of multiple true values)",
423     "Two bool values are compared directly using a C primitive. This "
424     "may produce unexpected results since all non-zero values are "
425     "considered true, so different true values may not be equal. "
426     "The file bool.h (included in splint/lib) provides bool_equal "
427     "for safe bool comparisons.", 0, 0
428   },
429   {
430     FK_BOOL, FK_OPS, modeFlag,
431     "boolops",
432     FLG_BOOLOPS,
433     "primitive operation (!, && or ||) does not has a boolean argument",
434     "The operand of a boolean operator is not a boolean. Use +ptrnegate "
435     "to allow ! to be used on pointers.",
436     0, 0
437   },
438   {
439     FK_BOOL, FK_POINTER, modeFlag,
440     "ptrnegate",
441     FLG_PTRNEGATE,
442     "allow ! to be used on pointer operand",
443     "The operand of ! operator is a pointer.", 0, 0
444   },
445   {
446     FK_BOOL, FK_PRED,plainFlag,
447     "predassign",
448     FLG_PREDASSIGN,
449     "condition test (if, while or for) is an assignment",
450     "The condition test is an assignment expression. Probably, you mean "
451     "to use == instead of =. If an assignment is intended, add an "
452     "extra parentheses nesting (e.g., if ((a = b)) ...) to suppress "
453     "this message.",
454     0, 0
455   },
456   {
457     FK_BOOL, FK_PRED, specialFlag,
458     "predbool",
459     FLG_PREDBOOL,
460     "type of condition test (if, while or for) not bool (sets predboolint, "
461     "predboolptr and predboolothers)",
462     "Test expression type is not boolean.", 0, 0
463   },
464   {
465     FK_PRED, FK_BOOL, modeFlag,
466     "predboolint",
467     FLG_PREDBOOLINT,
468     "type of condition test (if, while or for) is an integral type",
469     "Test expression type is not boolean or int.", 0, 0
470   },
471   {
472     FK_BOOL, FK_PRED, modeFlag,
473     "predboolptr",
474     FLG_PREDBOOLPTR,
475     "type of condition test (if, while or for) is a pointer",
476     "Test expression type is not boolean.", 0, 0
477   },
478   {
479     FK_BOOL, FK_PRED, modeFlag,
480     "predboolothers",
481     FLG_PREDBOOLOTHERS,
482     "type of condition test (if, while or for) not bool, int or pointer",
483     "Test expression type is not boolean.", 0, 0
484   },
485
486   /*
487   ** 4.3 Abstract types
488   */
489
490   {
491     FK_ABSTRACT, FK_NONE, plainFlag,
492     "abstract",
493     FLG_ABSTRACT,
494     "data abstraction barriers",
495     "An abstraction barrier is broken. If necessary, use /*@access <type>@*/ to allow access to an abstract type.",
496     0, 0
497   },
498   {
499     FK_ABSTRACT, FK_NONE, modeFlag,
500     "abstractcompare",
501     FLG_ABSTRACTCOMPARE,
502     "object equality comparison on abstract type operands",
503     "An object comparison (== or !=) is used on operands of abstract type.",
504     0, 0
505   },
506
507   {
508     FK_ABSTRACT, FK_NONE, plainFlag,
509     "numabstract",
510     FLG_NUMABSTRACT,
511     "data abstraction barriers",
512     "An abstraction barrier involving a numabstract type is broken. If necessary, use /*@access <type>@*/ to allow access to a numabstract type.",
513     0, 0
514   },
515   {
516     FK_ABSTRACT, FK_NONE, modeFlag,
517     "numabstractcast",
518     FLG_NUMABSTRACTCAST,
519     "numeric literal cast to numabstract type",
520     "A numeric literal is cast to a numabstract type.",
521     0, 0
522   },
523   {
524     FK_ABSTRACT, FK_NONE, modeFlag,
525     "numabstractlit",
526     FLG_NUMABSTRACTLIT,
527     "numeric literal can used as numabstract type",
528     "To allow a numeric literal to be used as a numabstract type, use +numabstractlit.",
529     0, 0
530   },
531   {
532     FK_ABSTRACT, FK_TYPEEQ, modeFlag,
533     "numabstractindex",
534     FLG_NUMABSTRACTINDEX,
535     "a numabstract type can be used to index an array",
536     "To allow numabstract types to index arrays, use +numabstractindex.",
537     0, 0
538   },
539   {
540     FK_ABSTRACT, FK_NONE, modeFlag,
541     "numabstractprint",
542     FLG_NUMABSTRACTPRINT,
543     "a numabstract value is printed using %d format code",
544     "A numabstract value is printed usind %d format code in a printf.",
545     0, 0
546   },
547   {
548     FK_ABSTRACT, FK_IMPLICIT, plainFlag,
549     "impabstract",
550     FLG_IMPABSTRACT,
551     "assume user type definitions are abstract (unless /*@concrete@*/ is used)",
552     NULL,
553     0, 0
554   },
555
556   /* 4.3.1 Access */
557
558   {
559     FK_ABSTRACT, FK_NAMES, plainFlag,
560     "accessmodule",
561     FLG_ACCESSMODULE,
562     "allow access to abstract types in definition module",
563     "The representation of an abstract type defined in <M>.<x> is "
564     "accessible anywhere in a file named <M>.<y>.", 
565     0, 0
566   },
567   {
568     FK_ABSTRACT, FK_NAMES, plainFlag,
569     "accessfile",
570     FLG_ACCESSFILE,
571     "allow access to abstract types by file name convention",
572     "The representation of an abstract type named <t> is "
573     "accessible anywhere in a file named <t>.<x>.", 
574     0, 0
575   },
576   {
577     FK_ABSTRACT, FK_NAMES, plainFlag,
578     "accessczech",
579     FLG_ACCESSCZECH,
580     "allow access to abstract types by czech naming convention",
581     "The representation of an abstract type named <t> is accessible "
582     "in the definition of a function or constant named <t>_<name>",
583     0, 0
584   },
585   {
586     FK_ABSTRACT, FK_NAMES, plainFlag,
587     "accessslovak",
588     FLG_ACCESSSLOVAK,
589     "allow access to abstract types by slovak naming convention",
590     "The representation of an abstract type named <t> is accessible "
591     "in the definition of a function or constant named <t><Name>",
592     0, 0
593   },
594   {
595     FK_ABSTRACT, FK_NAMES, plainFlag,
596     "accessczechoslovak",
597     FLG_ACCESSCZECHOSLOVAK,
598     "allow access to abstract types by czechoslovak naming convention",
599     "The representation of an abstract type named <t> is accessible "
600     "in the definition of a function or constant named <t>_<name> or <t><Name>",
601     0, 0
602   },
603   {
604     FK_ABSTRACT, FK_NAMES, specialFlag,
605     "accessall",
606     FLG_ACCESSALL,
607     "set accessmodule, accessfile and accessczech",
608     "Sets accessmodule, accessfile and accessczech",
609     0, 0
610   },
611
612   /* 4.3.2 Mutability */
613   {
614     FK_ABSTRACT, FK_NONE, modeFlag,
615     "mutrep",
616     FLG_MUTREP,
617     "representation of mutable type has sharing semantics",
618     "LCL semantics requires that a mutable type exhibits sharing semantics. "
619     "In order for objects to be shared a indirection is necessary in the representation. "
620     "A mutable type may be represented by a pointer or an abstract mutable type. Handles "
621     "into static data are fine, too, but will generate this error message unless it is suppressed.",
622     0, 0
623   },
624   
625   
626   /*
627   ** Memory Management (5)
628   */
629
630   /* Deallocation Errors */
631   {
632     FK_MEMORY, FK_LEAK, modeFlag,
633     "mustfreefresh",
634     FLG_MUSTFREEFRESH,
635     "freshly allocated storage not released before return or scope exit",
636     "A memory leak has been detected. Storage allocated locally "
637     "is not released before the last reference to it is lost.",
638     0, 0
639   },
640   {
641     FK_MEMORY, FK_LEAK, modeFlag,
642     "mustfreeonly",
643     FLG_MUSTFREEONLY,
644     "only storage not released before return or scope exit",
645     "A memory leak has been detected. Only-qualified storage is not released before the last "
646     "reference to it is lost.",
647     0, 0
648   },
649   {
650     FK_MEMORY, FK_LEAK, specialFlag,
651     "mustfree",
652     FLG_MUSTFREE,
653     "fresh or only storage not released before return or scope exit (sets mustfreefresh and mustfreeonly)",
654     "A memory leak has been detected.",
655     0, 0
656   },
657   {
658     FK_MEMORY, FK_DEAD, modeFlag,
659     "usereleased",
660     FLG_USERELEASED,
661     "storage used after release",
662     "Memory is used after it has been released (either by passing "
663     "as an only param or assigning to an only global).",
664     0, 0
665   },
666   {
667     FK_MEMORY, FK_DEAD, modeFlag,
668     "strictusereleased",
669     FLG_STRICTUSERELEASED,
670     "element used after it may have been released",
671     "Memory (through fetch) is used after it may have been released "
672     "(either by passing as an only param or assigning to an only global).",
673     0, 0
674   },
675   {
676     FK_MEMORY, FK_LEAK, modeFlag,
677     "compdestroy",
678     FLG_COMPDESTROY,
679     "all only references derivable from void pointer out only parameter are released",
680     "A storage leak due to incomplete deallocation of a structure or deep "
681     "pointer is suspected. Unshared storage that is reachable from "
682     "a reference that is being deallocated has not yet been deallocated. "
683     "Splint assumes when an object is passed "
684     "as an out only void pointer that the outer object will be "
685     "deallocated, but the inner objects will not.",
686     0, 0
687   },
688   {
689     FK_MEMORY, FK_LEAK, modeFlag,
690     "strictdestroy",
691     FLG_STRICTDESTROY,
692     "report complete destruction errors for array elements that "
693     "may have been released",
694     NULL,
695     0, 0        
696   },    
697   {
698     FK_MEMORY, FK_ARRAY, modeFlag,
699     "deparrays",
700     FLG_DEPARRAYS,
701     "array elements are dependent storage",
702     "When an element is fetched from an array, Splint analysis is "
703     "not able to determine if the same element is reused. "
704     "If +deparrays, Splint will mark local storage assigned from "
705     "array fetches as dependent.", 
706     0, 0
707   },
708   {
709     FK_MEMORY, FK_NONE, modeFlag,
710     "branchstate",
711     FLG_BRANCHSTATE,
712     "storage has inconsistent states of alternate paths through a branch",
713     "The state of a variable is different depending on which branch "
714     "is taken. This means no annotation can sensibly be applied "
715     "to the storage.",
716     0, 0
717   },
718   {
719     FK_MEMORY, FK_NONE, modeFlag,
720     "strictbranchstate",
721     FLG_STRICTBRANCHSTATE,
722     "storage through array fetch has inconsistent states of alternate "
723     "paths through a branch",
724     "The state of a variable through an array fetch is different depending "
725     "on which branch is taken. This means no annotation can sensibly be applied "
726     "to the storage.",
727     0, 0
728   },
729   {
730     FK_MEMORY, FK_NONE, specialFlag,
731     "memchecks",
732     FLG_MEMCHECKS,
733     "sets all dynamic memory checking flags (memimplicit, mustfree, mustdefine, "
734     "mustnotalias, null, memtrans)",
735     NULL, 0, 0
736   },
737   {
738     FK_MEMORY, FK_DEF, modeFlag,
739     "compmempass",
740     FLG_COMPMEMPASS,
741     "actual parameter matches alias kind of formal parameter completely ",
742     "Storage derivable from a parameter does not match the alias kind "
743     "expected for the formal parameter.",
744     0, 0
745   },
746   {
747     FK_MEMORY, FK_DEAD, modeFlag,
748     "stackref",
749     FLG_RETSTACK,
750     "external reference to stack-allocated storage is created",
751     "A stack reference is pointed to by an external reference when the "
752     "function returns. The stack-allocated storage is destroyed "
753     "after the call, leaving a dangling reference.",
754     0, 0
755   },
756
757   {
758     FK_MEMORY, FK_NONE, specialFlag,
759     "memtrans",
760     FLG_MEMTRANS,
761     "memory transfer errors (sets all *trans flags)",
762     "Memory is transferred in a way that violates annotations.",
763     0, 0
764   },
765   {
766     FK_MEMORY, FK_NONE, modeFlag,
767     "dependenttrans",
768     FLG_DEPENDENTTRANS,
769     "dependent transfer errors",
770     "Dependent storage is transferred to a non-dependent reference.",
771     0, 0
772   },
773   {
774     FK_MEMORY, FK_NONE, modeFlag,
775     "newreftrans",
776     FLG_NEWREFTRANS,
777     "new reference transfer to reference counted reference",
778     "A new reference is transferred to a reference counted reference.",
779     0, 0
780   },
781   {
782     FK_MEMORY, FK_NONE, modeFlag,
783     "onlytrans",
784     FLG_ONLYTRANS,
785     "only storage transferred to non-only reference (memory leak)",
786     "The only reference to this storage is transferred to another "
787     "reference (e.g., by returning it) that does not have the "
788     "only annotation. This may lead to a memory leak, since the "
789     "new reference is not necessarily released.",
790     0, 0
791   },
792   {
793     FK_MEMORY, FK_NONE, modeFlag,
794     "onlyunqglobaltrans",
795     FLG_ONLYUNQGLOBALTRANS,
796     "only storage transferred to an unqualified global or "
797     "static reference (memory leak)",
798     "The only reference to this storage is transferred to another "
799     "reference that does not have an aliasing annotation. "
800     "This may lead to a memory leak, since the "
801     "new reference is not necessarily released.",
802     0, 0
803   },
804   {
805     FK_MEMORY, FK_NONE, modeFlag,
806     "ownedtrans",
807     FLG_OWNEDTRANS,
808     "owned storage transferred to non-owned reference (memory leak)",
809     "The owned reference to this storage is transferred to another "
810     "reference (e.g., by returning it) that does not have the "
811     "owned annotation. This may lead to a memory leak, since the "
812     "new reference is not necessarily released.",
813     0, 0
814   },
815   {
816     FK_MEMORY, FK_NONE, modeFlag,
817     "freshtrans",
818     FLG_FRESHTRANS,
819     "fresh storage transferred to non-only reference (memory leak)",
820     "Fresh storage (newly allocated in this function) is transferred "
821     "in a way that the obligation to release storage is not "
822     "propagated.  Use the /*@only@*/ annotation to indicate "
823     "the a return value is the only reference to the returned "
824     "storage.",
825     0, 0
826   },
827   {
828     FK_MEMORY, FK_NONE, modeFlag,
829     "sharedtrans",
830     FLG_SHAREDTRANS,
831     "shared storage transferred to non-shared reference",
832     "Shared storage is transferred to a non-shared reference. The other "
833     "reference may release storage needed by this reference.",
834     0, 0
835   },
836   {
837     FK_MEMORY, FK_NONE, modeFlag,
838     "temptrans",
839     FLG_TEMPTRANS,
840     "temp storage transferred to non-temporary reference",
841     "Temp storage (associated with a formal parameter) is transferred "
842     "to a non-temporary reference. The storage may be released "
843     "or new aliases created.",
844     0, 0
845   },
846   {
847     FK_MEMORY, FK_NONE, modeFlag,
848     "kepttrans",
849     FLG_KEPTTRANS,
850     "kept storage transferred to non-temporary reference",
851     "storage is transferred "
852     "to a non-temporary reference after being passed as keep parameter. The storage may be released "
853     "or new aliases created.",
854     0, 0
855   },
856   {
857     FK_MEMORY, FK_NONE, modeFlag,
858     "keeptrans",
859     FLG_KEEPTRANS,
860     "keep storage transferred inconsistently",
861     "Keep storage is transferred inconsistently --- either in a way "
862     "that may add a new alias to it, or release it.",
863     0, 0
864   },
865   {
866     FK_MEMORY, FK_NONE, modeFlag,
867     "immediatetrans",
868     FLG_IMMEDIATETRANS,
869     "an immediate address (result of &) is transferred inconsistently",
870     "An immediate address (result of & operator) is transferred "
871     "inconsistently.",
872     0, 0
873   },
874   {
875     FK_MEMORY, FK_NONE, modeFlag,
876     "refcounttrans",
877     FLG_REFCOUNTTRANS,
878     "reference counted storage is transferred in an inconsistent way",
879     "Reference counted storage is transferred in a way that may not "
880     "be consistent with the reference count.",
881     0, 0
882   },
883   {
884     FK_MEMORY, FK_NONE, modeFlag,
885     "statictrans",
886     FLG_STATICTRANS,
887     "static storage is transferred in an inconsistent way",
888     "Static storage is transferred in an inconsistent way.",
889     0, 0
890   },
891   {
892     FK_MEMORY, FK_NONE, modeFlag,
893     "unqualifiedtrans",
894     FLG_UNKNOWNTRANS,
895     "unqualified storage is transferred in an inconsistent way",
896     "Unqualified storage is transferred in an inconsistent way.",
897     0, 0
898   },
899   {
900     FK_MEMORY, FK_NONE, modeFlag,
901     "staticinittrans",
902     FLG_STATICINITTRANS,
903     "static storage is used as an initial value in an inconsistent way",
904     "Static storage is used as an initial value in an inconsistent way.",
905     0, 0
906   },
907   {
908     FK_MEMORY, FK_NONE, modeFlag,
909     "unqualifiedinittrans",
910     FLG_UNKNOWNINITTRANS,
911     "unqualified storage is used as an initial value in an inconsistent way",
912     "Unqualified storage is used as an initial value in an inconsistent way.",
913     0, 0
914   },
915   {
916     FK_MEMORY, FK_NONE, modeFlag,
917     "readonlytrans",
918     FLG_READONLYTRANS,
919     "report memory transfer errors for initializations to read-only string literals",
920     "A read-only string literal is assigned to a non-observer reference.",
921     0, 0
922   },
923   {
924     FK_MEMORY, FK_PARAMS, modeFlag,
925     "passunknown",
926     FLG_PASSUNKNOWN,
927     "passing a value as an un-annotated parameter clears its annotation",
928     NULL, 0, 0
929   },
930
931   /* 5.3 Implicit Memory Annotations */
932
933   {
934     FK_MEMORY, FK_NONE, modeFlag,
935     "readonlystrings",
936     FLG_READONLYSTRINGS,
937     "string literals are read-only (error if one is modified or released)",
938     "String literals are read-only. An error is reported "
939     "if a string literal may be modified or released.",
940     0, 0
941   },
942   {
943     FK_MEMORY, FK_IMPLICIT, modeFlag,
944     "memimp",
945     FLG_MEMIMPLICIT,
946     "memory errors for unqualified storage",
947     NULL, 0, 0
948   },
949   {
950     FK_MEMORY, FK_IMPLICIT, plainFlag,
951     "paramimptemp",
952     FLG_PARAMIMPTEMP,
953     "assume unannotated parameter is temp",
954     NULL, 0, 0
955   },
956   {
957     FK_MEMORY, FK_IMPLICIT, specialFlag,
958     "allimponly",
959     FLG_ALLIMPONLY,
960     "sets globimponly, retimponly, structimponly, specglobimponly, "
961     "specretimponly and specstructimponly",  
962     NULL, 0, 0
963   },    
964   {
965     FK_MEMORY, FK_IMPLICIT, specialFlag,
966     "codeimponly",
967     FLG_CODEIMPONLY,
968     "sets globimponly, retimponly and structimponly",
969     NULL, 0, 0
970   },    
971   {
972     FK_MEMORY, FK_IMPLICIT, specialFlag,
973     "specimponly",
974     FLG_SPECALLIMPONLY,
975     "sets specglobimponly, specretimponly and specstructimponly",
976     NULL, 0, 0
977   },    
978   {
979     FK_MEMORY, FK_IMPLICIT, plainFlag,
980     "globimponly",
981     FLG_GLOBIMPONLY,
982     "assume unannotated global storage is only",
983     NULL, 0, 0
984   },
985   {
986     FK_MEMORY, FK_IMPLICIT, plainFlag,
987     "retimponly",
988     FLG_RETIMPONLY,
989     "assume unannotated returned storage is only",
990     NULL, 0, 0
991   },
992   {
993     FK_MEMORY, FK_IMPLICIT, plainFlag,
994     "structimponly",
995     FLG_STRUCTIMPONLY,
996     "assume unannotated structure field is only",
997     NULL, 0, 0
998   },
999   {
1000     FK_MEMORY, FK_IMPLICIT, plainFlag,
1001     "specglobimponly",
1002     FLG_SPECGLOBIMPONLY,
1003     "assume unannotated global storage is only",
1004     NULL, 0, 0
1005   },
1006   {
1007     FK_MEMORY, FK_IMPLICIT, plainFlag,
1008     "specretimponly",
1009     FLG_SPECRETIMPONLY,
1010     "assume unannotated returned storage is only",
1011     NULL, 0, 0
1012   },
1013   {
1014     FK_MEMORY, FK_IMPLICIT, plainFlag,
1015     "specstructimponly",
1016     FLG_SPECSTRUCTIMPONLY,
1017     "assume unannotated structure field is only",
1018     NULL, 0, 0
1019   },
1020
1021   /* Reference Counting */
1022
1023   
1024
1025   /*
1026   ** 6. Sharing
1027   */
1028
1029   /* 6.1 Aliasing warnings */
1030
1031   {
1032     FK_ALIAS, FK_MEMORY, modeFlag,
1033     "aliasunique",
1034     FLG_ALIASUNIQUE,
1035     "unique parameter is aliased",
1036     "A unique or only parameter is aliased by some other parameter or visible global.",
1037     0, 0
1038   },
1039   {
1040     FK_ALIAS, FK_MEMORY, modeFlag,
1041     "mayaliasunique",
1042     FLG_MAYALIASUNIQUE,
1043     "unique parameter may be aliased",
1044     "A unique or only parameter may be aliased by some other parameter or visible global.",
1045     0, 0
1046   },
1047   {
1048     FK_ALIAS, FK_MEMORY, modeFlag,
1049     "mustnotalias",
1050     FLG_MUSTNOTALIAS,
1051     "temp storage aliased at return point or scope exit",
1052     "An alias has been added to a temp-qualifier parameter or global that is visible externally when the function returns. If the aliasing is needed, use the /*@shared@*/ annotation to indicate that new aliases to the parameter may be created.",
1053     0, 0
1054   },
1055   {
1056     FK_ALIAS, FK_NONE, modeFlag,
1057     "retalias",
1058     FLG_RETALIAS,
1059     "function returns alias to parameter or global",
1060     "The returned value shares storage with a parameter or global. If a parameter is to be returned, use the returned qualifier. If the result is not modified, use the observer qualifier on the result type. Otherwise, exposed can be used, but limited checking is done.", 0, 0
1061   },
1062
1063   /* Global aliasing */
1064   {
1065     FK_ALIAS, FK_GLOBALS, specialFlag,
1066     "globalias",
1067     FLG_GLOBALIAS,
1068     "function returns with global aliasing external state (sets "
1069     "checkstrictglobalias, checkedglobalias, checkmodglobalias and "
1070     "uncheckedglobalias)",
1071     "A global variable aliases externally-visible state when the function returns.",
1072     0, 0
1073   },
1074   {
1075     FK_ALIAS, FK_GLOBALS, modeFlag,
1076     "checkstrictglobalias",
1077     FLG_CHECKSTRICTGLOBALIAS,
1078     "function returns with a checkstrict global aliasing external state",
1079     "A global variable aliases externally-visible state when the function returns.",
1080     0, 0
1081   },
1082   {
1083     FK_ALIAS, FK_GLOBALS, modeFlag,
1084     "checkedglobalias",
1085     FLG_CHECKEDGLOBALIAS,
1086     "function returns with a checked global aliasing external state",
1087     "A global variable aliases externally-visible state when the function returns.",
1088     0, 0
1089   },
1090   {
1091     FK_ALIAS, FK_GLOBALS, modeFlag,
1092     "checkmodglobalias",
1093     FLG_CHECKMODGLOBALIAS,
1094     "function returns with a checkmod global aliasing external state",
1095     "A global variable aliases externally-visible state when the function returns.",
1096     0, 0
1097   },
1098   {
1099     FK_ALIAS, FK_GLOBALS, modeFlag,
1100     "uncheckedglobalias",
1101     FLG_UNCHECKEDGLOBALIAS,
1102     "function returns with an unchecked global aliasing external state",
1103     "A global variable aliases externally-visible state when the function returns.",
1104     0, 0
1105   },
1106
1107   /* 6.2 Exposure */
1108
1109   {
1110     FK_MEMORY, FK_NONE, modeFlag,
1111     "exposetrans",
1112     FLG_EXPOSETRANS,
1113     "exposure transfer errors",
1114     "Exposed storage is transferred to a non-exposed, non-observer reference.",
1115     0, 0
1116   },
1117   {
1118     FK_MEMORY, FK_NONE, modeFlag,
1119     "observertrans",
1120     FLG_OBSERVERTRANS,
1121     "observer transfer errors",
1122     "Observer storage is transferred to a non-observer reference.",
1123     0, 0
1124   },
1125   {
1126     FK_EXPOSURE, FK_ABSTRACT, specialFlag,
1127     "repexpose",
1128     FLG_REPEXPOSE,
1129     "abstract representation is exposed (sets assignexpose, retexpose, and castexpose)",
1130     "The internal representation of an abstract type is visible to the "
1131     "caller. This means clients may have access to a pointer "
1132     "into the abstract representation.",
1133     0, 0
1134   },
1135   {
1136     FK_EXPOSURE, FK_ABSTRACT, modeFlag,
1137     "retexpose",
1138     FLG_RETEXPOSE,
1139     "abstract representation is exposed (return values only)",
1140     "The return value shares storage with an instance of an abstract "
1141     "type. This means clients may have access to a pointer into "
1142     "the abstract representation. Use the observer qualifier to "
1143     "return exposed storage that may not be modified by the "
1144     "client. Use the exposed qualifier to return modifiable "
1145     "(but not deallocatable) exposed storage (dangerous).",
1146     0, 0
1147   },
1148   {
1149     FK_EXPOSURE, FK_ABSTRACT, modeFlag,
1150     "assignexpose",
1151     FLG_ASSIGNEXPOSE,
1152     "abstract representation is exposed (assignments only)",
1153     "Storage internal to the representation of an abstract type is "
1154     "assigned to an external pointer. This means clients may "
1155     "have access to a pointer into the abstract representation. "
1156     "If the external pointer is a parameter, the exposed qualifier "
1157     "can be used to allow the assignment, however, this is "
1158     "considered dangerous programming practice.",
1159     0, 0
1160   },
1161   {
1162     FK_EXPOSURE, FK_ABSTRACT, modeFlag,
1163     "castexpose",
1164     FLG_CASTEXPOSE,
1165     "abstract representation is exposed through a cast",
1166     "Storage internal to the representation of an abstract type is exposed "
1167     "through a type cast. This means clients may have access to a "
1168     "pointer into the abstract representation.",
1169     0, 0
1170   },
1171   {
1172     FK_DECL, FK_TYPE, modeFlag,
1173     "redundantsharequal",
1174     FLG_REDUNDANTSHAREQUAL,
1175     "declaration uses observer qualifier that is always true",
1176     "A declaration of an immutable object uses a redundant observer qualifier.",
1177     0, 0
1178   } ,
1179   {
1180     FK_DECL, FK_TYPE, modeFlag,
1181     "misplacedsharequal",
1182     FLG_MISPLACEDSHAREQUAL,
1183     "declaration of unsharable storage uses sharing annotation",
1184     "A declaration of an unsharable object uses a sharing annotation.",
1185     0, 0
1186   } ,
1187
1188   /*
1189   ** 7. Function Interfaces
1190   */
1191
1192   /* 7.1  Modifications */
1193
1194   {
1195     FK_MODIFIES, FK_SPEC, plainFlag,
1196     "mods",
1197     FLG_MODIFIES,
1198     "unspecified modification of caller-visible state",
1199     "An externally-visible object is modified by a function, but not "
1200     "listed in its modifies clause.",
1201     0, 0
1202   },
1203   {
1204     FK_MODIFIES, FK_SPEC, modeFlag,
1205     "mustmod",
1206     FLG_MUSTMOD,
1207     "specified modification is not detected",
1208     "An object listed in the modifies clause is not modified by the "
1209     "implementation of the function. The modification may not "
1210     "be detected if it is done through a call to an unspecified "
1211     "function.",
1212     0, 0
1213   },
1214   {
1215     FK_MODIFIES, FK_MEMORY, plainFlag,
1216     "modobserver",
1217     FLG_MODOBSERVER,
1218     "possible modification of observer storage",
1219     "Storage declared with observer is possibly modified. Observer "
1220     "storage may not be modified.",
1221     0, 0
1222   },
1223   {
1224     FK_MODIFIES, FK_MEMORY, modeFlag,
1225     "modobserveruncon",
1226     FLG_MODOBSERVERUNCON,
1227     "possible modification of observer storage through unconstrained call",
1228     "Storage declared with observer may be modified through a call to an "
1229     "unconstrained function.",
1230     0, 0
1231   },
1232   {
1233     FK_MODIFIES, FK_MEMORY, modeFlag,
1234     "modinternalstrict",
1235     FLG_MODINTERNALSTRICT,
1236     "possible modification of internal storage through function call",
1237     "A function that modifies internalState is called from a function that "
1238     "does not list internalState in its modifies clause",
1239     0, 0
1240   },
1241   {
1242     FK_MODIFIES, FK_UNSPEC, modeFlag,
1243     "modfilesys",
1244     FLG_MODFILESYSTEM,
1245     "report undocumented file system modifications (applies to unspecified "
1246     "functions if modnomods is set)", 
1247     NULL, 0, 0
1248   },
1249   {
1250     FK_MODIFIES, FK_UNSPEC, specialFlag,
1251     "modunspec",
1252     FLG_MODUNSPEC,
1253     "modification in unspecified functions (sets modnomods, "
1254     "modglobunspec and modstrictglobsunspec)",
1255     NULL, 0, 0
1256   },
1257   {
1258     FK_MODIFIES, FK_UNSPEC, modeFlag,
1259     "modnomods",
1260     FLG_MODNOMODS,
1261     "modification in a function with no modifies clause",
1262     "An externally-visible object is modified by a function with no "
1263     "/*@modifies@*/ comment. The /*@modifies ... @*/ control "
1264     "comment can be used to give a modifies list for an "
1265     "unspecified function.",
1266     0, 0
1267   },
1268   {
1269     FK_MODIFIES, FK_UNSPEC, modeFlag,
1270     "moduncon",
1271     FLG_MODUNCON,
1272     "possible modification through a call to an unconstrained function",
1273     "An unconstrained function is called in a function body where "
1274     "modifications are checked. Since the unconstrained function "
1275     "may modify anything, there may be undetected modifications in "
1276     "the checked function.",
1277     0, 0
1278   },
1279   {
1280     FK_MODIFIES, FK_UNSPEC, modeFlag,
1281     "modunconnomods",
1282     FLG_MODUNCONNOMODS,
1283     "possible modification through a call to an unconstrained function in "
1284     "a function with no modifies clause",
1285     "An unconstrained function is called in a function body where "
1286     "modifications are checked. Since the unconstrained function "
1287     "may modify anything, there may be undetected modifications in "
1288     "the checked function.",
1289     0, 0
1290   },
1291   {
1292     FK_MODIFIES, FK_GLOBALS, modeFlag,
1293     "globsimpmodsnothing",
1294     FLG_GLOBALSIMPMODIFIESNOTHING,
1295     "functions declared with a globals list but no modifies clause are "
1296     "assumed to modify nothing",
1297     "An implicit modifies nothing clause is assumed for a function "
1298     "declared with a globals list but not modifies clause.",
1299     0, 0
1300   },
1301   {
1302     FK_MODIFIES, FK_GLOBALS, modeFlag,
1303     "modsimpnoglobs",
1304     FLG_MODIFIESIMPNOGLOBALS,
1305     "functions declared with a modifies clause but no globals list "
1306     "are assumed to use no globals",
1307     "An implicit empty globals list is assumed for a function "
1308     "declared with a modifies clause but no globals list.",
1309     0, 0
1310   },
1311
1312   /*
1313   ** Globals
1314   */
1315
1316   {
1317     FK_GLOBALS, FK_NONE, modeFlag,
1318     "globstate",
1319     FLG_GLOBSTATE,
1320     "returns with global in inconsistent state (null or undefined)",
1321     "A global variable does not satisfy its annotations when control is transferred.",
1322     0, 0
1323   },
1324
1325   {
1326     FK_GLOBALS, FK_SPEC, plainFlag,
1327     "globs",
1328     FLG_GLOBALS,
1329     "undocumented use of a checked global variable",
1330     "A checked global variable is used in the function, but not listed in "
1331     "its globals clause. By default, only globals specified in .lcl "
1332     "files are checked. To check all globals, use +allglobals. To "
1333     "check globals selectively use /*@checked@*/ in the global "
1334     "declaration.",
1335     0, 0
1336   },
1337   {
1338     FK_GLOBALS, FK_SPEC, modeFlag,
1339     "globuse",
1340     FLG_USEALLGLOBS,
1341     "global listed for a function not used",
1342     "A global variable listed in the function's globals list is not used "
1343     "in the body of the function.",
1344     0, 0
1345   },
1346   {
1347     FK_GLOBALS, FK_NONE, modeFlag,
1348     "internalglobs",
1349     FLG_INTERNALGLOBS,
1350     "use of internalState",
1351     "A called function uses internal state, but the globals list for the "
1352     "function being checked does not include internalState",
1353     0, 0
1354   },
1355   {
1356     FK_GLOBALS, FK_NONE, modeFlag,
1357     "internalglobsnoglobs",
1358     FLG_INTERNALGLOBSNOGLOBS,
1359     "use of internalState (in function with no globals list)",
1360     "A called function uses internal state, but the function being checked "
1361     "has no globals list",
1362     0, 0
1363   },
1364   {
1365     FK_GLOBALS, FK_MODIFIES, modeFlag,
1366     "warnmissingglobs",
1367     FLG_WARNMISSINGGLOBALS,
1368     "global variable used in modifies clause is not listed in globals list",
1369     "A global variable is used in the modifies clause, but it is not listed in "
1370     "the globals list.  The variable will be added to the globals list.",
1371     0, 0
1372   },
1373
1374   {
1375     FK_GLOBALS, FK_MODIFIES, modeFlag,
1376     "warnmissingglobsnoglobs",
1377     FLG_WARNMISSINGGLOBALSNOGLOBS,
1378     "global variable used in modifies clause in a function with no globals list",
1379     "A global variable is used in the modifies clause, but the function "
1380     "has no globals list.  The variable will be added to the globals list.",
1381     0, 0
1382   },
1383   {
1384     FK_GLOBALS, FK_UNSPEC, modeFlag,
1385     "globnoglobs",
1386     FLG_GLOBUNSPEC,
1387     "use of checked global in a function with no globals list or specification",
1388     "A specified global variable is used in the function, but not listed "
1389     "in its globals list. Without +globnoglobs, only globals "
1390     "declared with /*@checkedstrict@*/ will produce use "
1391     "errors in functions without globals "
1392     "lists. The /*@globals ... @*/ control comment can be used to give "
1393     "a globals list for an unspecified function.",
1394     0, 0
1395   },
1396   {
1397     FK_GLOBALS, FK_IMPLICIT, modeFlag,
1398     "allglobs",
1399     FLG_ALLGLOBALS,
1400     "report use and modification errors for globals not annotated with unchecked",
1401     NULL, 0, 0
1402   },
1403   {
1404     FK_GLOBALS, FK_UNSPEC, modeFlag,
1405     "checkstrictglobs",
1406     FLG_CHECKSTRICTGLOBALS,
1407     "report use and modification errors for checkedstrict globals",
1408     NULL, 0, 0
1409   },
1410   {
1411     FK_GLOBALS, FK_UNSPEC, modeFlag,
1412     "impcheckedspecglobs",
1413     FLG_IMPCHECKEDSPECGLOBALS,
1414     "assume checked qualifier for unqualified global declarations in .lcl files",
1415     NULL, 0, 0
1416   },
1417   {
1418     FK_GLOBALS, FK_UNSPEC, modeFlag,
1419     "impcheckmodspecglobs",
1420     FLG_IMPCHECKMODSPECGLOBALS,
1421     "assume checkmod qualifier for unqualified global declarations in .lcl files",
1422     NULL, 0, 0
1423   },
1424   {
1425     FK_GLOBALS, FK_UNSPEC, modeFlag,
1426     "impcheckedstrictspecglobs",
1427     FLG_IMPCHECKEDSTRICTSPECGLOBALS,
1428     "assume checkmod qualifier for unqualified global declarations in .lcl files",
1429     NULL, 0, 0
1430   },
1431   {
1432     FK_GLOBALS, FK_UNSPEC, modeFlag,
1433     "impcheckedglobs",
1434     FLG_IMPCHECKEDGLOBALS,
1435     "assume checked qualifier for unqualified global declarations",
1436     NULL, 0, 0
1437   },
1438   {
1439     FK_GLOBALS, FK_UNSPEC, modeFlag,
1440     "impcheckmodglobs",
1441     FLG_IMPCHECKMODGLOBALS,
1442     "assume checkmod qualifier for unqualified global declarations",
1443     NULL, 0, 0
1444   },
1445   {
1446     FK_GLOBALS, FK_UNSPEC, modeFlag,
1447     "impcheckedstrictglobs",
1448     FLG_IMPCHECKEDSTRICTGLOBALS,
1449     "assume checkedstrict qualifier for unqualified global declarations",
1450     NULL, 0, 0
1451   },
1452   {
1453     FK_GLOBALS, FK_UNSPEC, modeFlag,
1454     "impcheckedstatics",
1455     FLG_IMPCHECKEDSTATICS,
1456     "assume checked qualifier for unqualified file static declarations",
1457     NULL, 0, 0
1458   },
1459   {
1460     FK_GLOBALS, FK_UNSPEC, modeFlag,
1461     "impcheckmodstatics",
1462     FLG_IMPCHECKMODSTATICS,
1463     "assume checkmod qualifier for unqualified file static declarations",
1464     NULL, 0, 0
1465   },
1466   {
1467     FK_GLOBALS, FK_UNSPEC, modeFlag,
1468     "impcheckmodinternals",
1469     FLG_IMPCHECKMODINTERNALS,
1470     "assume checkmod qualifier for unqualified local "
1471     "static declarations (for internal state modifications)",
1472     NULL, 0, 0
1473   },
1474   {
1475     FK_GLOBALS, FK_UNSPEC, modeFlag,
1476     "impcheckedstrictstatics",
1477     FLG_IMPCHECKEDSTRICTSTATICS,
1478     "assume checkedstrict qualifier for unqualified file static declarations",
1479     NULL, 0, 0
1480   },
1481   {
1482     FK_GLOBALS, FK_MODIFIES, modeFlag,
1483     "modglobs",
1484     FLG_MODGLOBS,
1485     "undocumented modification of a checked global variable",
1486     "A checked global variable is modified by the function, but not listed in "
1487     "its modifies clause.",
1488     0, 0
1489   },
1490   {
1491     FK_GLOBALS, FK_MODIFIES, modeFlag,
1492     "modglobsnomods",
1493     FLG_MODGLOBSUNSPEC,
1494     "undocumented modification of a checked global variable in a function "
1495     "declared with no modifies clause",
1496     "A checked global variable is modified by the function, but not listed in "
1497     "its modifies clause.",
1498     0, 0
1499   },
1500   {
1501     FK_GLOBALS, FK_MODIFIES, modeFlag,
1502     "modstrictglobsnomods",
1503     FLG_MODSTRICTGLOBSUNSPEC,
1504     "undocumented modification of a strict checked global variable in a "
1505     "function declared with no modifies clause",
1506     "A checked global variable is modified by the function, but not listed in "
1507     "its modifies clause.",
1508     0, 0
1509   },
1510   {
1511     FK_GLOBALS, FK_MODIFIES, modeFlag,
1512     "modglobsunchecked",
1513     FLG_MODGLOBSUNCHECKED,
1514     "undocumented modification of an unchecked checked global variable",
1515     "An unchecked global variable is modified by the function, but not listed in "
1516     "its modifies clause.",
1517     0, 0
1518   },
1519
1520   /*
1521   ** State Clauses
1522   */
1523
1524   /*
1525   ** 8. Control Flow 
1526   */
1527
1528   /* 8.1 Execution */
1529
1530   {
1531     FK_CONTROL, FK_NONE, modeFlag,
1532     "noret",
1533     FLG_NORETURN,
1534     "path with no return detected in non-void function",
1535     "There is a path through a function declared to return a value on "
1536     "which there is no return statement. This means the execution "
1537     "may fall through without returning a meaningful result to "
1538     "the caller.",
1539     0, 0
1540   },
1541   {
1542     FK_CONTROL, FK_NONE, plainFlag,
1543     "emptyret", 
1544     FLG_EMPTYRETURN, 
1545     "empty return in function declared to return value",
1546     NULL,
1547     0, 0
1548   },
1549   {
1550     FK_CONTROL, FK_NONE, plainFlag,
1551     "alwaysexits",
1552     FLG_ALWAYSEXITS, 
1553     "loop predicate always exits", 
1554     NULL,
1555     0, 0
1556   },
1557
1558   {
1559     FK_CONTROL, FK_MEMORY, specialFlag,
1560     "loopexec",
1561     FLG_LOOPEXEC,
1562     "assume all loops execute at least once (sets forloopexec, whileloopexec and iterloopexec)",
1563     NULL, 0, 0
1564   },
1565   {
1566     FK_CONTROL, FK_MEMORY, plainFlag,
1567     "forloopexec",
1568     FLG_FORLOOPEXEC,
1569     "assume all for loops execute at least once",
1570     NULL, 0, 0
1571   },
1572   {
1573     FK_CONTROL, FK_MEMORY, plainFlag,
1574     "whileloopexec",
1575     FLG_WHILELOOPEXEC,
1576     "assume all while loops execute at least once",
1577     NULL, 0, 0
1578   },
1579   {
1580     FK_CONTROL, FK_MEMORY, plainFlag,
1581     "iterloopexec",
1582     FLG_ITERLOOPEXEC,
1583     "assume all iterator loops execute at least once",
1584     NULL, 0, 0
1585   },
1586   {
1587     FK_CONTROL, FK_MEMORY, plainFlag,
1588     "obviousloopexec",
1589     FLG_OBVIOUSLOOPEXEC,
1590     "assume loop that can be determined to always execute always does",
1591     NULL, 0, 0
1592   },
1593
1594   /* 8.2 Undefined Behavior */
1595
1596   {
1597     FK_BEHAVIOR, FK_ANSI, modeFlag,
1598     "evalorder",
1599     FLG_EVALORDER,
1600     "code has unspecified or implementation-dependent behavior "
1601     "because of order of evaluation",
1602     "Code has unspecified behavior. "
1603     "Order of evaluation of function parameters or subexpressions "
1604     "is not defined, so if a value is used and modified in different "
1605     "places not separated by a sequence point constraining "
1606     "evaluation order, then the result of the expression is "
1607     "unspecified.", 
1608     0, 0
1609   },
1610   {
1611     FK_BEHAVIOR, FK_ANSI, modeFlag,
1612     "evalorderuncon",
1613     FLG_EVALORDERUNCON,
1614     "code involving call to unspecified function has undefined or implementation-dependent behavior",
1615     "Code involving a call to function with no modifies or globals clause "
1616     "may have undefined or implementation-dependent behavior (Splint assumes the "
1617     "unconstrained call may modify any reachable state or use any global). Add a "
1618     "specification for the function.", 
1619     0, 0
1620   },
1621
1622   /* 8.3 Problematic Control Structures */
1623
1624   /* 8.3.1 Infinite Loops */
1625
1626   {
1627     FK_CONTROL, FK_NONE, modeFlag,
1628     "infloops",
1629     FLG_INFLOOPS,
1630     "likely infinite loop is detected",
1631     "This appears to be an infinite loop. Nothing in the body of the "
1632     "loop or the loop test modifies the value of the loop test. "
1633     "Perhaps the specification of a function called in the loop "
1634     "body is missing a modification.",
1635     0, 0
1636   },
1637   {
1638     FK_CONTROL, FK_NONE, modeFlag,
1639     "infloopsuncon",
1640     FLG_INFLOOPSUNCON,
1641     "likely infinite loop is detected (may result from unconstrained function)",
1642     "This appears to be an infinite loop. Nothing in the body of the "
1643     "loop or the loop test modifies the value of the loop test. "
1644     "There may be a modification through a call to an unconstrained "
1645     "function, or an unconstrained function in the loop test may use "
1646     "a global variable modified by the loop body.",
1647     0, 0
1648   },
1649
1650   /* 8.3.2 Switches */
1651
1652   {
1653     FK_CONTROL, FK_NONE, modeFlag,
1654     "casebreak",
1655     FLG_CASEBREAK,
1656     "non-empty case in a switch without preceding break",
1657     "Execution falls through from the previous case (use /*@fallthrough@*/ to mark fallthrough cases).", 0, 0
1658   },
1659   {
1660     FK_CONTROL, FK_NONE, modeFlag,
1661     "misscase",
1662     FLG_MISSCASE,
1663     "switch on enum type missing case for some value",
1664     "Not all values in an enumeration are present as cases in the switch.",
1665     0, 0
1666   },
1667   {
1668     FK_CONTROL, FK_NONE, modeFlag,
1669     "firstcase",
1670     FLG_FIRSTCASE,
1671     "first statement in switch is not a case",
1672     "The first statement after a switch is not a case.",
1673     0, 0
1674   },
1675   {
1676     FK_CONTROL, FK_NONE, plainFlag,
1677     "duplicatecases",
1678     FLG_DUPLICATECASES, 
1679     "duplicate cases in switch",
1680     "Duplicate cases in switch.",
1681     0, 0
1682   },
1683
1684   /* 8.3.3 Deep Breaks */
1685
1686   {
1687     FK_CONTROL, FK_NONE, specialFlag,
1688     "deepbreak",
1689     FLG_DEEPBREAK,
1690     "break inside nested while or for or switch",
1691     "A break statement appears inside the body of a nested while, for or "
1692     "switch statement. Sets looploopbreak, loopswitchbreak, "
1693     "switchloopbreak, switchswitchbreak, and looploopcontinue.",
1694     0, 0
1695   },
1696   {
1697     FK_CONTROL, FK_NONE, modeFlag,
1698     "looploopbreak",
1699     FLG_LOOPLOOPBREAK,
1700     "break inside nested while or for",
1701     "A break statement appears inside the body of a nested while or for "
1702     "statement. This is perfectly reasonable code, but check that "
1703     "the break is intended to break only the inner loop. The "
1704     "break statement may be preceded by /*@innerbreak@*/ to suppress "
1705     "the message for this break only.",
1706     0, 0
1707   },
1708   {
1709     FK_CONTROL, FK_NONE, modeFlag,
1710     "switchloopbreak",
1711     FLG_SWITCHLOOPBREAK,
1712     "break in loop inside switch",
1713     "A break statement appears inside the body of a while or for "
1714     "statement within a switch. This is perfectly reasonable code, but check that "
1715     "the break is intended to break only the inner loop. The "
1716     "break statement may be preceded by /*@loopbreak@*/ to suppress "
1717     "the message for this break only.",
1718     0, 0
1719   },
1720   {
1721     FK_CONTROL, FK_NONE, modeFlag,
1722     "loopswitchbreak",
1723     FLG_LOOPSWITCHBREAK,
1724     "break in switch inside loop",
1725     "A break statement appears inside a switch statement within a while or "
1726     "for loop. This is perfectly reasonable code, but check that "
1727     "the break is intended to break only the inner loop. The "
1728     "break statement may be preceded by /*@switchbreak@*/ to suppress "
1729     "the message for this break only.",
1730     0, 0
1731   },
1732   {
1733     FK_CONTROL, FK_NONE, modeFlag,
1734     "switchswitchbreak",
1735     FLG_SWITCHSWITCHBREAK,
1736     "break in switch inside switch",
1737     "A break statement appears inside a switch statement within another "
1738     "switch statement. This is perfectly reasonable code, but check that "
1739     "the break is intended to break only the inner switch. The "
1740     "break statement may be preceded by /*@innerbreak@*/ to suppress "
1741     "the message for this break only.",
1742     0, 0
1743   },
1744   {
1745     FK_CONTROL, FK_NONE, modeFlag,
1746     "looploopcontinue",
1747     FLG_LOOPLOOPCONTINUE,
1748     "continue inside nested loop",
1749     "A continue statement appears inside a loop within a loop. "
1750     "This is perfectly reasonable code, but check that "
1751     "the continue is intended to continue only the inner loop. The "
1752     "continue statement may be preceded by /*@innercontinue@*/ to suppress "
1753     "the message for this continue only.",
1754     0, 0
1755   },
1756
1757   /* 8.3.4 Loop and If Bodies */
1758
1759   {
1760     FK_CONTROL, FK_NONE, modeFlag,
1761     "whileempty",
1762     FLG_WHILEEMPTY,
1763     "a while statement has no body",
1764     "While statement has no body.",
1765     0, 0
1766   },
1767   {
1768     FK_CONTROL, FK_NONE, modeFlag,
1769     "whileblock",
1770     FLG_WHILEBLOCK,
1771     "the body of a while statement is not a block",
1772     "While body is a single statement, not a compound block.",
1773     0, 0
1774   },
1775   {
1776     FK_CONTROL, FK_NONE, modeFlag,
1777     "forempty",
1778     FLG_FOREMPTY,
1779     "a for statement has no body",
1780     "For statement has no body.",
1781     0, 0
1782   },
1783   {
1784     FK_CONTROL, FK_NONE, modeFlag,
1785     "forblock",
1786     FLG_FORBLOCK,
1787     "the body of a for statement is not a block",
1788     "Loop body is a single statement, not a compound block.",
1789     0, 0
1790   },
1791   {
1792     FK_CONTROL, FK_NONE, modeFlag,
1793     "ifempty",
1794     FLG_IFEMPTY,
1795     "an if statement has no body",
1796     "If statement has no body.",
1797     0, 0
1798   },
1799   {
1800     FK_CONTROL, FK_NONE, modeFlag,
1801     "ifblock",
1802     FLG_IFBLOCK,
1803     "the body of an if statement is not a block",
1804     "If body is a single statement, not a compound block.",
1805     0, 0
1806   },
1807   {
1808     FK_CONTROL, FK_NONE, specialFlag,
1809     "allempty",
1810     FLG_ALLEMPTY,
1811     "an if, while or for statement has no body (sets ifempty, "
1812     "whileempty and forempty",
1813     NULL,
1814     0, 0
1815   },
1816   {
1817     FK_CONTROL, FK_NONE, specialFlag,
1818     "allblock",
1819     FLG_ALLBLOCK,
1820     "the body of an if, while or for statement is not a block "
1821     "(sets ifblock, whileblock and forblock)",
1822     "Body is a single statement, not a compound block.",
1823     0, 0
1824   },
1825
1826   /* 8.3.5 Complete Logic */
1827
1828   {
1829     FK_CONTROL, FK_NONE, modeFlag,
1830     "elseifcomplete",
1831     FLG_ELSEIFCOMPLETE,
1832     "if ... else if chains must have final else",
1833     "There is no final else following an else if construct.",
1834     0, 0
1835   },
1836
1837   /* 8.4 Suspicious Statements */
1838
1839   {
1840     FK_CONTROL, FK_NONE, modeFlag,
1841     "unreachable",
1842     FLG_UNREACHABLE,
1843     "unreachable code detected",
1844     "This code will never be reached on any possible execution.",
1845     0, 0
1846   },
1847
1848   /* 8.4.1 Statements with No Effects */
1849
1850   {
1851     FK_EFFECT, FK_CONTROL, modeFlag,
1852     "noeffect",
1853     FLG_NOEFFECT,
1854     "statement with no effect",
1855     "Statement has no visible effect --- no values are modified.",
1856     0, 0
1857   },
1858   {
1859     FK_EFFECT, FK_CONTROL, modeFlag,
1860     "noeffectuncon",
1861     FLG_NOEFFECTUNCON,
1862     "statement with no effect (except possibly through call to "
1863     "unconstrained function)",
1864     "Statement has no visible effect --- no values are modified. It may "
1865     "modify something through a call to an unconstrained function.",
1866     0, 0
1867   },
1868
1869   /* 8.4.2 Ignored Return Values */
1870
1871   {
1872     FK_IGNORERET, FK_NONE, specialFlag,
1873     "retval",
1874     FLG_RETVAL,
1875     "return value ignored (sets retvalint, retvalbool and retvalother)",
1876     "Result returned by function call is not used. If this is intended, "
1877        "cast result to (void) to eliminate message.",
1878     0, 0
1879   },
1880   {
1881     FK_IGNORERET, FK_BOOL, modeFlag,
1882     "retvalother",
1883     FLG_RETVALOTHER,
1884     "return value of type other than bool or int ignored",
1885     "Result returned by function call is not used. If this is intended, "
1886        "can cast result to (void) to eliminate message.",
1887     0, 0
1888   },
1889   {
1890     FK_IGNORERET, FK_BOOL, modeFlag,
1891     "retvalbool",
1892     FLG_RETVALBOOL,
1893     "return value of manifest type bool ignored",
1894     "Result returned by function call is not used. If this is intended, "
1895        "can cast result to (void) to eliminate message.",
1896     0, 0
1897   },
1898   {
1899     FK_IGNORERET, FK_NONE, modeFlag,
1900     "retvalint",
1901     FLG_RETVALINT,
1902     "return value of type int ignored",
1903     "Result returned by function call is not used. If this is intended, "
1904        "can cast result to (void) to eliminate message.",
1905     0, 0
1906   },
1907
1908   /*
1909   ** 9. Buffer Sizes 
1910   */
1911
1912   {
1913     FK_BOUNDS, FK_MEMORY, modeFlag,
1914     "nullterminated",
1915     FLG_NULLTERMINATED,
1916     "misuse of nullterminated allocation",
1917     "A possibly non-nullterminated string/memory is used/referenced as a nullterminated one.",
1918     0, 0
1919   },
1920   {
1921     FK_BOUNDS, FK_MEMORY, specialFlag,
1922     "bounds",
1923     FLG_BOUNDS,
1924     "memory bounds checking (sets boundsread and boundswrite)",
1925     "Memory read or write may be out of bounds of allocated storage.", 0, 0
1926   },
1927   {
1928     FK_BOUNDS, FK_MEMORY, specialFlag,
1929     "likelybounds",
1930     FLG_LIKELYBOUNDS,
1931     "memory bounds checking (sets likelyboundsread and likelyboundswrite)",
1932     "Memory read or write may be out of bounds of allocated storage.", 0, 0
1933   },
1934   {
1935     FK_BOUNDS, FK_MEMORY, modeFlag,
1936     "likelyboundsread",
1937     FLG_LIKELYBOUNDSREAD,
1938     "likely out of bounds read",
1939     "A memory read references memory beyond the allocated storage.",
1940     0, 0
1941   },
1942   {
1943     FK_BOUNDS, FK_MEMORY, modeFlag,
1944     "likelyboundswrite",
1945     FLG_LIKELYBOUNDSWRITE,
1946     "likely buffer overflow from an out of bounds write",
1947     "A memory write may write to an address beyond the allocated buffer.",
1948     0, 0
1949   },
1950   
1951   {
1952     FK_BOUNDS, FK_MEMORY, modeFlag,
1953     "boundsread",
1954     FLG_BOUNDSREAD,
1955     "possible out of bounds read",
1956     "A memory read references memory beyond the allocated storage.",
1957     0, 0
1958   },
1959   {
1960     FK_BOUNDS, FK_MEMORY, modeFlag,
1961     "boundswrite",
1962     FLG_BOUNDSWRITE,
1963     "possible buffer overflow from an out of bounds write",
1964     "A memory write may write to an address beyond the allocated buffer.",
1965     0, 0
1966   },
1967   
1968   {
1969     FK_BOUNDS, FK_DISPLAY, plainFlag,
1970     "fcnpost",
1971     FLG_FUNCTIONPOST,
1972     "display function post conditions",
1973     "Display function post conditions.",
1974     0, 0
1975   },
1976   {
1977     FK_BOUNDS, FK_DISPLAY, plainFlag,
1978     "redundantconstraints",
1979     FLG_REDUNDANTCONSTRAINTS,
1980     "display seemingly redundant constraints",
1981     "Display seemingly redundant constraints",
1982     0, 0
1983   },
1984   /*drl7x added 6/18/01 */    
1985   {
1986     FK_BOUNDS, FK_MEMORY, modeFlag,
1987     "checkpost",
1988     FLG_CHECKPOST,
1989     "unable to verify predicate in ensures clause",
1990     "The function implementation may not satisfy a post condition given in an ensures clause.",
1991     0, 0
1992   },
1993
1994   {
1995     FK_BOUNDS, FK_MEMORY, plainFlag,
1996     "impboundsconstraints",
1997     FLG_IMPBOUNDSCONSTRAINTS,
1998     "generate implicit constraints for functions",
1999     NULL,
2000     0, 0
2001   },
2002   /*drl7x added 4/29/01 */    
2003   {
2004     FK_BOUNDS, FK_MEMORY, plainFlag,
2005     "orconstraint",
2006     FLG_ORCONSTRAINT,
2007     "use limited OR expressions to resolve constraints",
2008     NULL,
2009     0, 0
2010   },
2011   {
2012     FK_BOUNDS, FK_DISPLAY, plainFlag,
2013     "showconstraintparens",
2014     FLG_PARENCONSTRAINT,
2015     "display parentheses around constraint terms",
2016     NULL,
2017     0, 0
2018   },  
2019   /*drl added 2/4/2002*/
2020   {
2021     FK_BOUNDS, FK_DISPLAY, plainFlag,
2022     "boundscompacterrormessages",
2023     FLG_BOUNDSCOMPACTERRORMESSAGES,
2024     "Display fewer new lines in bounds checking error messages",
2025     NULL,
2026     0, 0
2027   },  
2028   {
2029     FK_BOUNDS, FK_DISPLAY, plainFlag,
2030     "showconstraintlocation",
2031     FLG_CONSTRAINTLOCATION,
2032     "display location for every constraint generated",
2033     NULL,
2034     0, 0
2035   }, /*drl added flag 4/26/01*/
2036
2037   { /* evans added 2003-06-08 */
2038     FK_BOUNDS, FK_MEMORY, modeFlag,
2039     "allocmismatch",
2040     FLG_ALLOCMISMATCH,
2041     "type conversion involves storage of non-divisble size",
2042     NULL, 0, 0
2043   },
2044
2045   /*
2046   ** 10. Extensible Checking 
2047   */
2048
2049   {
2050     FK_EXTENSIBLE, FK_FILES, globalStringFlag, ARG_FILE,
2051     "mts",
2052     FLG_MTSFILE,
2053     "load meta state declaration and corresponding xh file", 
2054     NULL, 0, 0
2055   },
2056   {
2057     FK_EXTENSIBLE, FK_MEMORY, modeFlag,
2058     "statetransfer",
2059     FLG_STATETRANSFER,
2060     "storage has been transfered with invalid state",
2061     "Transfer violates user-defined state rules.",
2062     0, 0
2063   },
2064   {
2065     FK_EXTENSIBLE, FK_MEMORY, modeFlag,
2066     "statemerge",
2067     FLG_STATEMERGE,
2068     "control paths merge with storage in incompatible states",
2069     "Control path merge violates user-defined state merge rules.",
2070     0, 0
2071   },
2072
2073   /* 
2074   ** 11. Macros 
2075   */
2076
2077   {
2078     FK_MACROS, FK_NONE, modeFlag,
2079     "macroredef",
2080     FLG_MACROREDEF,
2081     "macro redefined",
2082     "A macro is defined in more than one place.", 0, 0
2083   },
2084   {
2085     FK_MACROS, FK_UNRECOG, modeFlag,
2086     "macrounrecog",
2087     FLG_MACROUNDEF,
2088     "unrecognized identifier in macro",
2089     "An unrecognized identifier appears in a macro. If the identifier "
2090     "is defined before the macro is used, then this is okay.",
2091     0, 0
2092   },
2093
2094   /* 11.1 Constant Macros */
2095
2096   {
2097     FK_MACROS, FK_PROTOS, modeFlag,
2098     "macroconstdecl",
2099     FLG_MACROCONSTDECL,
2100     "non-parameterized macro without prototype or specification",
2101     "Macro constant has no declaration. Use /*@constant ...@*/ to "
2102     "declare the macro.",
2103     0, 0
2104   },
2105
2106   /* 11.2 Function-like Macros */
2107   
2108   {
2109     FK_MACROS, FK_NONE, modeFlag,
2110     "macrostmt",
2111     FLG_MACROSTMT,
2112     "macro definition is syntactically not equivalent to function",
2113     "A macro is defined in a way that may cause syntactic problems. "
2114     "If the macro returns a value, use commas to separate expressions; "
2115     "otherwise, use do { <macro body> } while (FALSE) construct.",
2116     0, 0
2117   },
2118   {
2119     FK_MACROS, FK_NONE, modeFlag,
2120     "macroempty",
2121     FLG_MACROEMPTY,
2122     "macro definition for is empty",
2123     "A macro definition has no body.",
2124     0, 0
2125   },
2126   {
2127     FK_MACROS, FK_PARAMS, modeFlag,
2128     "macroparams",
2129     FLG_MACROPARAMS,
2130     "macro parameter not used exactly once",
2131     "A macro parameter is not used exactly once in all possible "
2132     "invocations of the macro. To behave like a function, "
2133     "each macro parameter must be used exactly once on all "
2134     "invocations of the macro so that parameters with "
2135     "side-effects are evaluated exactly once. Use /*@sef@*/ to "
2136     "denote parameters that must be side-effect free.",
2137     0, 0
2138   },
2139   {
2140     FK_MACROS, FK_CONTROL, modeFlag,
2141     "macroret",
2142     FLG_MACRORETURN,
2143     "return statement in macro body",
2144     "The body of a macro declared as a function uses a return statement. "
2145     "This exhibits behavior that "
2146     "could not be implemented by a function.", 
2147     0, 0
2148   },
2149   {
2150     FK_MACROS, FK_PARAMS, modeFlag,
2151     "macroassign",
2152     FLG_MACROASSIGN,
2153     "assignment to a macro parameter",
2154     "A macro parameter is used as the left side of an "
2155     "assignment expression. This exhibits behavior that "
2156     "could not be implemented by a function.", 
2157     0, 0
2158   },
2159   {
2160     FK_MACROS, FK_NONE, modeFlag,
2161     "macroparens",
2162     FLG_MACROPARENS,
2163     "macro parameter used without parentheses (in potentially dangerous context)",
2164     "A macro parameter is used without parentheses. This could be "
2165     "dangerous if the macro is invoked with a complex expression "
2166     "and precedence rules will change the evaluation inside the macro.",
2167     0, 0
2168   },
2169   {
2170     FK_MACROS, FK_PROTOS, modeFlag,
2171     "macrodecl",
2172     FLG_MACRODECL,
2173     "macro without prototype or specification (sets macrofcndecl and macroconstdecl)",
2174     "Argument checking cannot be done well for macros without prototypes "
2175     "or specifications, since the types of the arguments are unknown.",
2176     0, 0
2177   },
2178   {
2179     FK_MACROS, FK_PROTOS, modeFlag,
2180     "macrofcndecl",
2181     FLG_MACROFCNDECL,
2182     "parameterized macro without prototype or specification",
2183     "Function macro has no declaration.",
2184     0, 0
2185   },
2186
2187   /* 11.2.1 Side Effect Free Parameters */
2188
2189   {
2190     FK_MACROS, FK_PARAMS, modeFlag,
2191     "sefparams",
2192     FLG_SEFPARAMS,
2193     "a parameter with side-effects is passed as a sef parameter",
2194     "An actual parameter corresponding to a sef parameter may have a side-effect.",
2195     0, 0
2196   },
2197   {
2198     FK_MACROS, FK_PARAMS, modeFlag,
2199     "sefuncon",
2200     FLG_SEFUNSPEC,
2201     "a parameter with unconstrained side-effects is passed as a sef parameter",
2202     "An actual parameter corresponding to a sef parameter involves a call "
2203     "to a procedure with no modifies clause that may have a side-effect.",
2204     0, 0
2205   },
2206
2207   /* 11.3 Controlling Macro Checking */
2208
2209   {
2210     FK_MACROS, FK_NONE, plainFlag,
2211     "constmacros",
2212     FLG_CONSTMACROS,
2213     "check all macros without parameter lists as constants",
2214     "Every non-parameterized macro (not preceded by /*@notfunction@*/) "
2215     "is checked as a constant.",
2216     0, 0        
2217   },
2218   {
2219     FK_MACROS, FK_NONE, plainFlag,
2220     "fcnmacros",
2221     FLG_FCNMACROS,
2222     "check all macros with parameter lists as functions",
2223     "Every parameterized macro (not preceded by /*@notfunction@*/) "
2224     "is checked as a function.",
2225     0, 0        
2226   },
2227   {
2228     FK_MACROS, FK_NONE, plainSpecialFlag,
2229     "allmacros",
2230     FLG_ALLMACROS,
2231     "sets fcnmacros and constmacros",
2232     "All macros (not preceded by /*@notfunction@*/) are checked as functions or "
2233     "constants depending on whether or not they have parameter lists.",
2234     0, 0        
2235   },
2236   {
2237     FK_MACROS, FK_NONE, plainFlag,
2238     "libmacros",
2239     FLG_LIBMACROS,
2240     "check all macros with declarations in library as functions",
2241     "Every macro declared in the load library is checked.",
2242     0, 0        
2243   },
2244   {
2245     FK_MACROS, FK_NONE, plainFlag,
2246     "specmacros",
2247     FLG_SPECMACROS,
2248     "check all macros corresponding to specified functions or constants",
2249     "Every macro declared a specification file is checked.",
2250     0, 0        
2251   },
2252   {
2253     FK_MACROS, FK_NONE, modeFlag,
2254     "macromatchname",
2255     FLG_MACROMATCHNAME,
2256     "macro definition does not match iter or constant declaration",
2257     "A iter or constant macro is defined using a different name from the "
2258     "one used in the previous syntactic comment",
2259     0, 0
2260   },
2261   {
2262     FK_MACROS, FK_NONE, plainFlag,
2263     "nextlinemacros",
2264     FLG_MACRONEXTLINE,
2265     "the line after a constant or iter declaration must be a macro definition",
2266     "A constant or iter declaration is not immediately followed by a macro definition.",
2267     0, 0
2268   },
2269
2270   /* 11.4 Iterators */
2271
2272   {
2273     FK_ITER, FK_NONE, plainFlag,
2274     "iterbalance",
2275     FLG_ITERBALANCE,
2276     "iter is not balanced with end_<iter>",
2277     NULL,
2278     0, 0
2279   },
2280   {
2281     FK_ITER, FK_NONE, plainFlag,
2282     "iteryield",
2283     FLG_ITERYIELD,
2284     "iter yield parameter is inappropriate",
2285     NULL,
2286     0, 0
2287   },
2288   {
2289     FK_ITER, FK_NONE, plainFlag,
2290     "hasyield",
2291     FLG_HASYIELD,
2292     "iter declaration has no yield parameters",
2293     "An iterator has been declared with no parameters annotated with "
2294     "yield. This may be what you want, if the iterator is meant "
2295     "to do something a fixed number of times, but returns no "
2296     "information to the calling context. Probably, a parameter "
2297     "is missing the yield annotation to indicate that it is "
2298     "assigned a value in the calling context.",
2299     0, 0
2300   },
2301
2302   /*
2303   ** 12. Naming Conventions 
2304   */
2305
2306   {
2307     FK_NAMES, FK_ABSTRACT, plainFlag,
2308     "namechecks",
2309     FLG_NAMECHECKS,
2310     "controls name checking without changing other settings",
2311     NULL, 0, 0
2312   },
2313
2314   /* 12.1.1 Czech Names */
2315
2316   {
2317     FK_NAMES, FK_ABSTRACT, specialFlag,
2318     "czech",
2319     FLG_CZECH,
2320     "czech naming convention (sets accessczech, czechfunctions, czechvars, "
2321     "czechconstants, czechenums, and czechmacros)",
2322     "Name is not consistent with Czech naming convention.", 0, 0
2323   },
2324   {
2325     FK_NAMES, FK_ABSTRACT, plainFlag,
2326     "czechfcns",
2327     FLG_CZECHFUNCTIONS,
2328     "czech naming convention violated in a function or iterator declaration",
2329     "Function or iterator name is not consistent with Czech naming convention.", 0, 0
2330   },
2331   {
2332     FK_NAMES, FK_ABSTRACT, plainFlag,
2333     "czechvars",
2334     FLG_CZECHVARS,
2335     "czech naming convention violated in a variable declaration",
2336     "Variable name is not consistent with Czech naming convention.", 0, 0
2337   },
2338   {
2339     FK_NAMES, FK_ABSTRACT, plainFlag,
2340     "czechmacros",
2341     FLG_CZECHMACROS,
2342     "czech naming convention violated in an expanded macro name",
2343     "Expanded macro name is not consistent with Czech naming convention.", 0, 0
2344   },
2345   {
2346     FK_NAMES, FK_ABSTRACT, plainFlag,
2347     "czechconsts",
2348     FLG_CZECHCONSTANTS,
2349     "czech naming convention violated in a constant declaration",
2350     "Constant name is not consistent with Czech naming convention.", 0, 0
2351   },
2352   {
2353     FK_NAMES, FK_ABSTRACT, plainFlag,
2354     "czechtypes",
2355     FLG_CZECHTYPES,
2356     "czech naming convention violated in a user-defined type definition",
2357     "Type name is not consistent with Czech naming convention. Czech type "
2358     "names must not use the underscore character.", 0, 0
2359   },
2360
2361   /* 12.1.2 Slovak Names */
2362
2363   {
2364     FK_NAMES, FK_ABSTRACT, specialFlag,
2365     "slovak",
2366     FLG_SLOVAK,
2367     "slovak naming convention violated",
2368     "Name is not consistent with Slovak naming convention.", 0, 0
2369   },
2370   {
2371     FK_NAMES, FK_ABSTRACT, plainFlag,
2372     "slovakfcns",
2373     FLG_SLOVAKFUNCTIONS,
2374     "slovak naming convention violated in a function or iterator declaration",
2375     "Function or iterator name is not consistent with Slovak naming convention.", 0, 0
2376   },
2377   {
2378     FK_NAMES, FK_ABSTRACT, plainFlag,
2379     "slovakmacros",
2380     FLG_SLOVAKMACROS,
2381     "slovak naming convention violated in an expanded macro name",
2382     "Expanded macro name is not consistent with Slovak naming convention.", 0, 0
2383   },
2384   {
2385     FK_NAMES, FK_ABSTRACT, plainFlag,
2386     "slovakvars",
2387     FLG_SLOVAKVARS,
2388     "slovak naming convention violated in a variable declaration",
2389     "Variable name is not consistent with Slovak naming convention.", 0, 0
2390   },
2391   {
2392     FK_NAMES, FK_ABSTRACT, plainFlag,
2393     "slovakconsts",
2394     FLG_SLOVAKCONSTANTS,
2395     "slovak naming convention violated in a constant declaration",
2396     "Constant name is not consistent with Slovak naming convention.", 0, 0
2397   },
2398   {
2399     FK_NAMES, FK_ABSTRACT, plainFlag,
2400     "slovaktypes",
2401     FLG_SLOVAKTYPES,
2402     "slovak naming convention violated in a use-defined type definition",
2403     "Type name is not consistent with Slovak naming convention. Slovak type "
2404     "names may not include uppercase letters.", 0, 0
2405   },
2406
2407   /* 12.1.3 Czechoslovak Names */
2408   {
2409     FK_NAMES, FK_ABSTRACT, specialFlag,
2410     "czechoslovak",
2411     FLG_CZECHOSLOVAK,
2412     "czech or slovak naming convention violated",
2413     "Name is not consistent with either Czech or Slovak naming convention.", 0, 0
2414   },
2415   {
2416     FK_NAMES, FK_ABSTRACT, plainFlag,
2417     "czechoslovakfcns",
2418     FLG_CZECHOSLOVAKFUNCTIONS,
2419     "czechoslovak naming convention violated in a function or iterator declaration",
2420     "Function name is not consistent with Czechoslovak naming convention.", 0, 0
2421   },
2422   {
2423     FK_NAMES, FK_ABSTRACT, plainFlag,
2424     "czechoslovakmacros",
2425     FLG_CZECHOSLOVAKMACROS,
2426     "czechoslovak naming convention violated in an expanded macro name",
2427     "Expanded macro name is not consistent with Czechoslovak naming convention.", 0, 0
2428   },
2429   {
2430     FK_NAMES, FK_ABSTRACT, plainFlag,
2431     "czechoslovakvars",
2432     FLG_CZECHOSLOVAKVARS,
2433     "czechoslovak naming convention violated in a variable declaration",
2434     "Variable name is not consistent with Czechoslovak naming convention.", 0, 0
2435   },
2436   {
2437     FK_NAMES, FK_ABSTRACT, plainFlag,
2438     "czechoslovakconsts",
2439     FLG_CZECHOSLOVAKCONSTANTS,
2440     "czechoslovak naming convention violated in a constant declaration",
2441     "Constant name is not consistent with Czechoslovak naming convention.", 0, 0
2442   },
2443   {
2444     FK_NAMES, FK_ABSTRACT, plainFlag,
2445     "czechoslovaktypes",
2446     FLG_CZECHOSLOVAKTYPES,
2447     "czechoslovak naming convention violated in a user-defined type definition",
2448     "Type name is not consistent with Czechoslovak naming convention. Czechoslovak "
2449     "type names may not include uppercase letters or the underscore character.", 0, 0
2450   },
2451
2452   /* 12.2 Namespace Prefixes */
2453
2454   {
2455     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2456     "macrovarprefix",
2457     FLG_MACROVARPREFIX,
2458     "set namespace prefix for variables declared in a macro body",
2459     "A variable declared in a macro body does not start with the macrovarprefix.",
2460     0, 0
2461   } ,
2462   {
2463     FK_NAMES, FK_PREFIX, plainFlag,     
2464     "macrovarprefixexclude",
2465     FLG_MACROVARPREFIXEXCLUDE,
2466     "the macrovarprefix may not be used for non-macro variables",
2467     "A variable declared outside a macro body starts with the macrovarprefix.",
2468     0, 0        
2469   } ,   
2470   {
2471     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2472     "tagprefix",
2473     FLG_TAGPREFIX,
2474     "set namespace prefix for struct, union and enum tags",
2475     "A tag identifier does not start with the tagprefix.",
2476     0, 0
2477   } ,
2478   {
2479     FK_NAMES, FK_PREFIX, plainFlag,
2480     "tagprefixexclude",
2481     FLG_TAGPREFIXEXCLUDE,
2482     "the tagprefix may not be used for non-tag identifiers",
2483     "An identifier that is not a tag starts with the tagprefix.",
2484     0, 0        
2485   } ,   
2486   {
2487     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2488     "enumprefix",
2489     FLG_ENUMPREFIX,
2490     "set namespace prefix for enum members",
2491     "An enum member does not start with the enumprefix.",
2492     0, 0
2493   } ,
2494   {
2495     FK_NAMES, FK_PREFIX, plainFlag,
2496     "enumprefixexclude",
2497     FLG_ENUMPREFIXEXCLUDE,
2498     "the enumprefix may not be used for non-enum member identifiers",
2499     "An identifier that is not an enum member starts with the enumprefix.",
2500     0, 0        
2501   } ,   
2502   {
2503     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2504     "filestaticprefix",
2505     FLG_FILESTATICPREFIX,
2506     "set namespace prefix for file static declarations",
2507     "A file-static identifier does not start with the filestaticprefix.",
2508     0, 0
2509   } ,
2510   {
2511     FK_NAMES, FK_PREFIX, plainFlag,
2512     "filestaticprefixexclude",
2513     FLG_FILESTATICPREFIXEXCLUDE,
2514     "the filestaticprefix may not be used for identifiers that are not file static",
2515     "An identifier that is not file static starts with the filestaticprefix.",
2516     0, 0        
2517   } ,   
2518   {
2519     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2520     "globalprefix",
2521     FLG_GLOBPREFIX,
2522     "set namespace prefix for global variables",
2523     "A global variable does not start with the globalprefix",
2524     0, 0
2525   } ,
2526   {
2527     FK_NAMES, FK_PREFIX, plainFlag,
2528     "globalprefixexclude",
2529     FLG_GLOBPREFIXEXCLUDE,
2530     "the globalprefix may not be used for non-global identifiers",
2531     "An identifier that is not a global variable starts with the globalprefix.",
2532     0, 0        
2533   } ,   
2534   {
2535     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2536     "typeprefix",
2537     FLG_TYPEPREFIX,
2538     "set namespace prefix for user-defined types",
2539     "A user-defined type does not start with the typeprefix",
2540     0, 0
2541   } ,
2542   {
2543     FK_NAMES, FK_PREFIX, plainFlag,
2544     "typeprefixexclude",
2545     FLG_TYPEPREFIXEXCLUDE,
2546     "the typeprefix may not be used for identifiers that are not type names",
2547     "An identifier that is not a type name starts with the typeprefix.",
2548     0, 0        
2549   } ,   
2550   {
2551     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2552     "externalprefix",
2553     FLG_EXTERNALPREFIX,
2554     "set namespace prefix for external identifiers",
2555     "An external identifier does not start with the externalprefix",
2556     0, 0
2557   } ,
2558   {
2559     FK_NAMES, FK_PREFIX, plainFlag,
2560     "externalprefixexclude",
2561     FLG_EXTERNALPREFIXEXCLUDE,
2562     "the externalprefix may not be used for non-external identifiers",
2563     "An identifier that is not external starts with the externalprefix.",
2564     0, 0        
2565   } ,   
2566   {
2567     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2568     "localprefix",
2569     FLG_LOCALPREFIX,
2570     "set namespace prefix for local variables",
2571     "A local variable does not start with the localprefix",
2572     0, 0
2573   } ,
2574   {
2575     FK_NAMES, FK_PREFIX, plainFlag,
2576     "localprefixexclude",
2577     FLG_LOCALPREFIXEXCLUDE,
2578     "the localprefix may not be used for non-local identifiers",
2579     "An identifier that is not a local variable starts with the localprefix.",
2580     0, 0        
2581   } ,   
2582   {
2583     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2584     "uncheckedmacroprefix",
2585     FLG_UNCHECKEDMACROPREFIX,
2586     "set namespace prefix for unchecked macros",
2587     "An unchecked macro name does not start with the uncheckedmacroprefix",
2588     0, 0
2589   } ,
2590   {
2591     FK_NAMES, FK_PREFIX, plainFlag,
2592     "uncheckedmacroprefixexclude",
2593     FLG_UNCHECKEDMACROPREFIXEXCLUDE,
2594     "the uncheckmacroprefix may not be used for identifiers that are not "
2595     "unchecked macros",
2596     "An identifier that is not the name of an unchecked macro "
2597     "starts with the uncheckedmacroprefix.",
2598     0, 0        
2599   } ,   
2600   {
2601     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2602     "constprefix",
2603     FLG_CONSTPREFIX,
2604     "set namespace prefix for constants",
2605     "A constant does not start with the constantprefix",
2606     0, 0
2607   } ,
2608   {
2609     FK_NAMES, FK_PREFIX, plainFlag,
2610     "constprefixexclude",
2611     FLG_CONSTPREFIXEXCLUDE,
2612     "the constprefix may not be used for non-constant identifiers",
2613     "An identifier that is not a constant starts with the constantprefix.",
2614     0, 0        
2615   } ,   
2616   {
2617     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2618     "iterprefix",
2619     FLG_ITERPREFIX,
2620     "set namespace prefix for iterators",
2621     "An iter does not start with the iterator prefix",
2622     0, 0
2623   } ,
2624   {
2625     FK_NAMES, FK_PREFIX, plainFlag,
2626     "iterprefixexclude",
2627     FLG_ITERPREFIXEXCLUDE,
2628     "the iterprefix may not be used for non-iter identifiers",
2629     "An identifier that is not a iter starts with the iterprefix.",
2630     0, 0        
2631   } ,   
2632   {
2633     FK_NAMES, FK_PREFIX, idemStringFlag, ARG_STRING,
2634     "protoparamprefix",
2635     FLG_DECLPARAMPREFIX,
2636     "set namespace prefix for parameters in function prototype declarations",
2637     "A parameter name in a function prototype declaration does not start with the "
2638     "declaration parameter prefix",
2639     0, 0
2640   } ,
2641
2642   /* 12.3 Naming Restrictions */
2643   {
2644     FK_NAMES, FK_ANSI, modeFlag,
2645     "isoreserved",
2646     FLG_ISORESERVED,
2647     "external name conflicts with name reserved for system or standard library",
2648     "External name is reserved for system use by ISO C99 standard.",
2649     0, 0
2650   },
2651   {
2652     FK_NAMES, FK_ANSI, modeFlag,
2653     "cppnames",
2654     FLG_CPPNAMES,
2655     "external or internal name is a C++ keyword or reserved word",
2656     "External name is a C++ keyword or reserved word. "
2657     "This could lead to problems if the "
2658     "code is compiled with a C++ compiler.",
2659     0, 0
2660   },
2661   {
2662     FK_NAMES, FK_ANSI, modeFlag,
2663     "isoreservedinternal",
2664     FLG_ISORESERVEDLOCAL,
2665     "internal name conflicts with name reserved for system or standard library",
2666     "Internal name is reserved for system in ISO C99 standard (this should not be necessary unless you are worried about C library implementations that violate the standard and use macros).",
2667     0, 0
2668   },
2669   {
2670     FK_NAMES, FK_ANSI, plainFlag,
2671     "distinctexternalnames",
2672     FLG_DISTINCTEXTERNALNAMES,
2673     "external name is not distinguishable from another external name using "
2674     "the number of significant characters",
2675     "An external name is not distinguishable from another external name "
2676     "using the number of significant characters. According to "
2677     "ANSI Standard (3.1), an implementation may only consider the first 6 "
2678     "characters significant, and ignore alphabetical case "
2679     "distinctions (ISO C99 requires 31). The "
2680     "+externalnamelen <n> flag may be used to change the number "
2681     "of significant characters, and -externalnamecaseinsensitive to make "
2682     "alphabetical case significant in external names.",
2683     0, 0
2684   },
2685   {
2686     FK_NAMES, FK_ANSI, specialValueFlag,
2687     "externalnamelen",
2688     FLG_EXTERNALNAMELEN,
2689     "set the number of significant characters in an external name",
2690     "Sets the number of significant characters in an external name (default is 6 for old "
2691     "ANSI89 limit, C99 requires 31). "
2692     "Sets +distinctexternalnames.",
2693     0, 0
2694   },
2695   {
2696     FK_NAMES, FK_ANSI, plainSpecialFlag,
2697     "externalnamecaseinsensitive",
2698     FLG_EXTERNALNAMECASEINSENSITIVE,
2699     "alphabetic comparisons for external names are case-insensitive",
2700     "Make alphabetic case insignificant in external names. By ANSI89 "
2701     "standard, case need not be significant in an external name. "
2702     "If +distinctexternalnames is not set, sets "
2703     "+distinctexternalnames with unlimited external name length.",
2704     0, 0
2705   },
2706   {
2707     FK_NAMES, FK_ANSI, plainFlag,
2708     "distinctinternalnames",
2709     FLG_DISTINCTINTERNALNAMES,
2710     "internal name is not distinguishable from another internal name using "
2711     "the number of significant characters",
2712     "An internal name is not distinguishable from another internal name "
2713     "using the number of significant characters. According to "
2714     "ANSI89 Standard (3.1), an implementation may only consider the first 31 "
2715     "characters significant (ISO C99 specified 63). The "
2716     "+internalnamelen <n> flag changes the number "
2717     "of significant characters, -internalnamecaseinsensitive to makes "
2718     "alphabetical case significant, and "
2719     "+internalnamelookalike to make similar-looking characters "
2720     "non-distinct.",
2721     0, 0
2722   },
2723   {
2724     FK_NAMES, FK_ANSI, specialValueFlag,
2725     "internalnamelen",
2726     FLG_INTERNALNAMELEN,
2727     "set the number of significant characters in an internal name",
2728     "Sets the number of significant characters in an internal name (ANSI89 "
2729     "default is 31.)  Sets +distinctinternalnames.",
2730     0, 0
2731   },
2732   {
2733     FK_NAMES, FK_ANSI, plainSpecialFlag,
2734     "internalnamecaseinsensitive",
2735     FLG_INTERNALNAMECASEINSENSITIVE,
2736     "set whether case is significant an internal names "
2737     "(-internalnamecaseinsensitive means case is significant)" ,
2738     "Set whether case is significant an internal names "
2739     "(-internalnamecaseinsensitive "
2740     "means case is significant). By ANSI89 default, case is not "
2741     "significant.  If +distinctinternalnames is not set, sets "
2742     "+distinctinternalnames with unlimited internal name length.",
2743     0, 0
2744   },
2745   {
2746     FK_NAMES, FK_ANSI, plainSpecialFlag,
2747     "internalnamelookalike",
2748     FLG_INTERNALNAMELOOKALIKE,
2749     "lookalike characters match in internal names",
2750     "Set whether similar looking characters (e.g., \"1\" and \"l\") "
2751     "match in internal names.",
2752     0, 0
2753   },
2754   {
2755     FK_NAMES, FK_PREFIX, modeFlag,
2756     "protoparamname",
2757     FLG_DECLPARAMNAME,
2758     "a parameter in a function prototype has a name",
2759     "A parameter in a function prototype has a name.  This is dangerous, "
2760     "since a macro definition could be visible here.",
2761     0, 0        
2762   } ,   
2763   {
2764     FK_NAMES, FK_PREFIX, modeFlag,
2765     "protoparammatch",
2766     FLG_DECLPARAMMATCH,
2767     "the name of a parameter in a function prototype and corresponding "
2768     "declaration must match (after removing the protoparamprefix", 
2769     "A parameter in a function definition does not have the same name as "
2770     "the corresponding in the declaration of the function after "
2771     "removing the protoparamprefix", 
2772     0, 0        
2773   } ,   
2774   {
2775     FK_NAMES, FK_PREFIX, plainFlag,
2776     "protoparamprefixexclude",
2777     FLG_DECLPARAMPREFIXEXCLUDE,
2778     "the protoparamprefix may not be used for non-declaraction parameter identifiers",
2779     "An identifier that is not a parameter name in a function prototype "
2780     "starts with the protoparamprefix.",
2781     0, 0        
2782   } ,   
2783
2784   /*
2785   ** 13. Completeness 
2786   */
2787
2788   /* 13.1 Unused Declarations */
2789
2790   {
2791     FK_USE, FK_COMPLETE, modeFlag,
2792     "topuse",
2793     FLG_TOPUNUSED,
2794     "declaration at top level not used",
2795     "An external declaration not used in any source file.", 0, 0
2796   },
2797   {
2798     FK_USE, FK_EXPORT, modeFlag,
2799     "exportlocal",
2800     FLG_EXPORTLOCAL,
2801     "a declaration is exported but not used outside this module",
2802     "A declaration is exported, but not used outside this module. "
2803     "Declaration can use static qualifier.",
2804     0, 0
2805   },
2806   {
2807     FK_USE, FK_EXPORT, modeFlag,
2808     "exportheader",
2809     FLG_EXPORTHEADER,
2810     "a declaration is exported but does not appear in a header file",
2811     "A declaration is exported, but does not appear in a header file.",
2812     0, 0
2813   },
2814   {
2815     FK_USE, FK_EXPORT, modeFlag,
2816     "exportheadervar",
2817     FLG_EXPORTHEADERVAR,
2818     "a variable declaration is exported but does not appear in a header file",
2819     "A variable declaration is exported, but does not appear in a header "
2820     "file. (Used with exportheader.)",
2821     0, 0
2822   },
2823   {
2824     FK_USE, FK_NONE, modeFlag,
2825     "fielduse",
2826     FLG_FIELDUNUSED,
2827     "field of structure type not used",
2828     "A field is present in a structure type but never used. Use /*@unused@*/ in front of field declaration to suppress message.",
2829     0, 0
2830   },
2831   {
2832     FK_USE, FK_NONE, modeFlag,
2833     "enummemuse",
2834     FLG_ENUMMEMUNUSED,
2835     "member of an enum type not used",
2836     "A member of an enum type is never used.",
2837     0, 0
2838   },
2839   {
2840     FK_USE, FK_NONE, modeFlag,
2841     "constuse",
2842     FLG_CONSTUNUSED,
2843     "constant declared but not used",
2844     "A constant is declared but not used. Use unused in the constant declaration to suppress message.",
2845     0, 0
2846   },
2847   {
2848     FK_USE, FK_NONE, modeFlag,
2849     "fcnuse",
2850     FLG_FUNCUNUSED,
2851     "function declared but not used",
2852     "A function is declared but not used. Use /*@unused@*/ in front of function header to suppress message.",
2853     0, 0
2854   },
2855   {
2856     FK_USE, FK_PARAMS, modeFlag,
2857     "paramuse",
2858     FLG_PARAMUNUSED,
2859     "function parameter not used ",
2860     "A function parameter is not used in the body of the function. If the argument is needed for type compatibility or future plans, use /*@unused@*/ in the argument declaration.",
2861     0, 0
2862   },
2863   {
2864     FK_USE, FK_TYPE, modeFlag,
2865     "typeuse",
2866     FLG_TYPEUNUSED,
2867     "type declared but not used",
2868     "A type is declared but not used. Use /*@unused@*/ in front of typedef to suppress messages.",
2869     0, 0
2870   },
2871   {
2872     FK_USE, FK_NONE, modeFlag,
2873     "varuse",
2874     FLG_VARUNUSED,
2875     "variable declared but not used",
2876     "A variable is declared but never used. Use /*@unused@*/ in front "
2877     "of declaration to suppress message.",
2878     0, 0
2879   },
2880   {
2881     FK_USE, FK_COMPLETE, modeFlag,
2882     "unusedspecial",
2883     FLG_UNUSEDSPECIAL,
2884     "unused declaration in special file (corresponding to .l or .y file)",
2885     NULL, 0, 0
2886   } ,
2887
2888   /* 13.2 Complete Programs */
2889
2890   {
2891     FK_COMPLETE, FK_NONE, modeFlag,
2892     "declundef",
2893     FLG_DECLUNDEF,
2894     "function or variable declared but never defined",
2895     "A function or variable is declared, but not defined in any source code file.",
2896     0, 0
2897   },
2898   {
2899     FK_COMPLETE, FK_SPEC, modeFlag,
2900     "specundef",
2901     FLG_SPECUNDEF,
2902     "function or variable specified but never defined",
2903     "A function or variable is declared in an .lcl file, but not defined in any source code file.",
2904     0, 0
2905   },
2906   {
2907     FK_COMPLETE, FK_SPEC, plainFlag,
2908     "specundecl",
2909     FLG_SPECUNDECL,
2910     "function or variable specified but never declared in a source file",
2911     "A function or variable is declared in an .lcl file, but not declared "
2912     "in any source code file.",
2913     0, 0
2914   },
2915   {
2916     FK_DECL, FK_LIBS, plainFlag,
2917     "newdecl",
2918     FLG_NEWDECL,
2919     "report new global declarations in source files",
2920     "There is a new declaration that is not declared in a loaded library "
2921     "or earlier file.  (Use this flag to check for consistency "
2922     "against a library.)",
2923     0, 0
2924   },
2925   {
2926     FK_INIT, FK_SPEC, plainFlag,
2927     "needspec",
2928     FLG_NEEDSPEC,
2929     "information in specifications is not also included in syntactic comments",
2930     "There is information in the specification that is not duplicated "
2931     "in syntactic comments. Normally, this is not an "
2932     "error, but it may be useful to detect it to make "
2933     "sure checking incomplete systems without the specifications will "
2934     "still use this information.",
2935     0, 0
2936   },
2937
2938   /*
2939   ** 14. Libraries and Header File Inclusion 
2940   */
2941
2942   /* 14.1 Standard Libraries */
2943
2944   {
2945     FK_LIBS, FK_INIT, idemGlobalFlag,
2946     "nolib",
2947     FLG_NOLIB,
2948     "do not load standard library",
2949     NULL, 0, 0
2950   },
2951   {
2952     FK_LIBS, FK_INIT, idemGlobalFlag,
2953     "isolib",
2954     FLG_ANSILIB,
2955     "use normal standard library",
2956     "Library based on the ISO standard library specification is used.", 
2957     0, 0
2958   },
2959   {
2960     FK_LIBS, FK_INIT, idemGlobalFlag,
2961     "strictlib",
2962     FLG_STRICTLIB,
2963     "interpret standard library strictly",
2964     "Stricter version of the standard library is used. (The default "
2965     "library is standard.lcd;  strict library is strict.lcd.)", 
2966     0, 0
2967   },
2968   {
2969     FK_LIBS, FK_INIT, idemGlobalFlag,
2970     "unixlib",
2971     FLG_UNIXLIB,
2972     "use UNIX (sort-of) standard library",
2973     "UNIX version of the standard library is used.",
2974     0, 0
2975   },
2976   {
2977     FK_LIBS, FK_INIT, idemGlobalFlag,
2978     "unixstrictlib",
2979     FLG_UNIXSTRICTLIB,
2980     "use strict version of UNIX (sort-of) library",
2981     "strict version of the UNIX library is used.",
2982     0, 0
2983   },
2984   {
2985     FK_LIBS, FK_INIT, idemGlobalFlag,
2986     "posixlib",
2987     FLG_POSIXLIB,
2988     "use POSIX standard library",
2989     "POSIX version of the standard library is used.",
2990     0, 0
2991   },
2992   {
2993     FK_LIBS, FK_INIT, idemGlobalFlag,
2994     "posixstrictlib",
2995     FLG_POSIXSTRICTLIB,
2996     "use strict POSIX standard library",
2997     "POSIX version of the strict standard library is used.",
2998     0, 0
2999   },
3000   {
3001     FK_LIBS, FK_INIT, idemGlobalFlag,
3002     "whichlib",
3003     FLG_WHICHLIB,
3004     "show standard library filename",
3005     NULL, 0, 0
3006   },
3007   {
3008     FK_LIBS, FK_ANSI, plainFlag,
3009     "warnposixheaders",
3010     FLG_WARNPOSIX,
3011     "a POSIX header is included, but the POSIX library is not used",
3012     "Header name matches a POSIX header, but the POSIX library is not selected.",
3013     0, 0
3014   },
3015   {
3016     FK_LIBS, FK_ANSI, plainFlag,
3017     "warnunixlib",
3018     FLG_WARNUNIXLIB,
3019     "warn when the unix library is used",
3020     "Unix library may not be compatible with all platforms", 
3021     0, 0
3022   },
3023   {
3024     FK_LIBS, FK_ANSI, plainFlag,
3025     "usevarargs",
3026     FLG_USEVARARGS,
3027     "non-standard <varargs.h> included",
3028     "Header <varargs.h> is not part of ANSI Standard. "
3029     "Should use <stdarg.h> instead.",
3030     0, 0
3031   },
3032   {
3033     FK_HEADERS, FK_FILES, plainFlag,
3034     "caseinsensitivefilenames",
3035     FLG_CASEINSENSITIVEFILENAMES,
3036     "file names are case insensitive (file.h and FILE.H are the same file)",
3037     NULL, 0, 0
3038   },
3039
3040   /* 14.2 Generating Libraries */
3041
3042   {
3043     FK_LIBS, FK_FILES, globalStringFlag, ARG_FILE,
3044     "dump",
3045     FLG_DUMP,
3046     "save state for merging (default suffix .lcd)",
3047     NULL, 0, 0
3048   },
3049   {
3050     FK_LIBS, FK_FILES, globalStringFlag, ARG_FILE,
3051     "load",
3052     FLG_MERGE,
3053     "load state from dump file (default suffix .lcd)",
3054     NULL, 0, 0
3055   },
3056
3057   /* 14.3 Header File Inclusion */
3058
3059   {
3060     FK_HEADERS, FK_SPEED, globalFlag,
3061     "singleinclude",
3062     FLG_SINGLEINCLUDE,
3063     "optimize header inclusion to eliminate redundant includes",
3064     "When checking multiple files, each header file is processed only "
3065     "once. This may change the meaning of the code, if the "
3066     "same header file is included in different contexts (e.g., the "
3067     "header file includes #if directives and the values are "
3068     "different when it is included in different places.)",
3069     0, 0
3070   },
3071   {
3072     FK_HEADERS, FK_SPEED, globalFlag,
3073     "neverinclude",
3074     FLG_NEVERINCLUDE,
3075     "optimize header inclusion to not include any header files",
3076     "Ignore header includes. Only works if relevant information is "
3077     "loaded from a library.",
3078     0, 0
3079   },
3080   {
3081     FK_HEADERS, FK_SPEED, globalFlag,
3082     "skipsysheaders",
3083     FLG_SKIPSYSHEADERS,
3084     "do not include header files in system directories (set by -sysdirs)",
3085     "Do not include header files in system directories (set by -sysdirs)",
3086     0, 0
3087   },
3088
3089   /* 
3090   ** A. Operation?
3091   */
3092
3093
3094   /*
3095   ** Syntax 
3096   */
3097
3098   {
3099     FK_SYNTAX, FK_ANSI, plainFlag,
3100     "gnuextensions",
3101     FLG_GNUEXTENSIONS,
3102     "support some gnu (gcc) language extensions",
3103     "ANSI C does not allow some language features supported by gcc and other compilers. "
3104     "Use +gnuextensions to allow some of these extensions.", 0, 0
3105   },
3106
3107   /* Prototypes */
3108
3109   {
3110     FK_PROTOS, FK_ANSI, modeFlag,
3111     "noparams",
3112     FLG_NOPARAMS,
3113     "function declaration has no parameter list",
3114     "A function declaration does not have a parameter list.",
3115     0, 0
3116   },
3117   {
3118     FK_PROTOS, FK_ANSI, modeFlag,
3119     "oldstyle",
3120     FLG_OLDSTYLE,
3121     "old style function definition",
3122     "Function definition is in old style syntax. Standard prototype "
3123     "syntax is preferred.",
3124     0, 0
3125   },
3126
3127
3128   /*
3129   ** System functions
3130   */
3131
3132   {
3133     FK_SYSTEMFUNCTIONS, FK_TYPE, plainFlag,
3134     "maintype",
3135     FLG_MAINTYPE,
3136     "type of main does not match expected type",
3137     "The function main does not match the expected type.",
3138     0, 0
3139   },
3140   {
3141     FK_SYSTEMFUNCTIONS, FK_BEHAVIOR, modeFlag,
3142     "exitarg",
3143     FLG_EXITARG,
3144     "argument to exit has implementation defined behavior",
3145     "The argument to exit should be 0, EXIT_SUCCESS or EXIT_FAILURE",
3146     0, 0
3147   },
3148
3149   {
3150     FK_DECL, FK_NONE, modeFlag,
3151     "shadow",
3152     FLG_SHADOW,
3153     "declaration reuses name visible in outer scope",
3154     "An outer declaration is shadowed by the local declaration.",
3155     0, 0
3156   },
3157   {
3158     FK_DECL, FK_LIBS, modeFlag,
3159     "incondefslib",
3160     FLG_INCONDEFSLIB,
3161     "function, variable or constant defined in a library is redefined with inconsistent type",
3162     "A function, variable or constant previously defined in a library is "
3163     "redefined with a different type.",
3164     0, 0
3165   },
3166   {
3167     FK_DECL, FK_LIBS, modeFlag,
3168     "overload",
3169     FLG_WARNOVERLOAD,
3170     "library function overloaded",
3171     "A function, variable or constant defined in the library is redefined "
3172     "with a different type.",
3173     0, 0
3174   },
3175   {
3176     FK_DECL, FK_NONE, modeFlag,
3177     "nestedextern",
3178     FLG_NESTEDEXTERN,
3179     "an extern declaration is inside a function scope",
3180     "An extern declaration is used inside a function scope.",
3181     0, 0
3182   },    
3183   {
3184     FK_DECL, FK_NONE, modeFlag,
3185     "redecl",
3186     FLG_REDECL,
3187     "function or variable redeclared",
3188     "A function or variable is declared in more than one place. This is "
3189     "not necessarily a problem, since the declarations are consistent.",
3190     0, 0
3191   },    
3192   {
3193     FK_DECL, FK_NONE, plainFlag,
3194     "redef",
3195     FLG_REDEF,
3196     "function or variable redefined",
3197     "A function or variable is redefined. One of the declarations should use extern.",
3198     0, 0
3199   },
3200   {
3201     FK_DECL, FK_TYPE, modeFlag,
3202     "imptype",
3203     FLG_IMPTYPE,
3204     "variable declaration has unknown (implicitly int) type",
3205     "A variable declaration has no explicit type.  The type is implicitly int.",
3206     0, 0
3207   },
3208
3209   {
3210     FK_DIRECT, FK_FILES, globalStringFlag, ARG_DIRECTORY,
3211     "tmpdir",
3212     FLG_TMPDIR,
3213     "set directory for writing temp files",
3214     NULL, 0, 0
3215   },
3216   {
3217     FK_DIRECT, FK_FILES, globalStringFlag, ARG_PATH,
3218     "larchpath",
3219     FLG_LARCHPATH,
3220     "set path for searching for library files (overrides LARCH_PATH environment variable)",
3221     NULL, 0, 0
3222   },
3223   {
3224     FK_DIRECT, FK_FILES, globalStringFlag, ARG_DIRECTORY,
3225     "lclimportdir",
3226     FLG_LCLIMPORTDIR,
3227     "set directory to search for LCL import files (overrides LCLIMPORTDIR)",
3228     NULL, 0, 0
3229   },
3230   {
3231     FK_DIRECT, FK_FILES, globalStringFlag, ARG_PATH,
3232     "sysdirs",
3233     FLG_SYSTEMDIRS,
3234     "set directories for system files (default /usr/include). Separate "
3235     "directories with path separator (colons in Unix, semi-colons in Windows). "
3236     "Flag settings propagate to files in a system directory. If "
3237     "-sysdirerrors is set, no errors are reported for files in "
3238     "system directories.",
3239     NULL, 0, 0
3240   },
3241   {
3242     FK_DIRECT, FK_FILES, plainFlag,
3243     "skipisoheaders",
3244     FLG_SKIPISOHEADERS,
3245     "prevent inclusion of header files in a system directory with "
3246     "names that match standard ANSI headers. The symbolic information "
3247     "in the standard library is used instead.  Flag in effect only "
3248     "if a library including the ANSI library is loaded.  The ANSI "
3249     "headers are: assert, ctype, errno, float, limits, locale, math, "
3250     "setjmp, signal, stdarg, stddef, stdio, stdlib, strings, string, "
3251     "time, and wchar.",
3252     NULL, 0, 0
3253   },
3254   {
3255     FK_DIRECT, FK_FILES, plainFlag,
3256     "skipposixheaders",
3257     FLG_SKIPPOSIXHEADERS,
3258     "prevent inclusion of header files in a system directory with "
3259     "names that match standard POSIX headers. The symbolic information "
3260     "in the posix library is used instead.  The POSIX headers are: "
3261     "dirent, fcntl, grp, pwd, termios, sys/stat, sys/times, "
3262     "sys/types, sys/utsname, sys/wait, unistd, and utime.",
3263     NULL, 0, 0
3264   },
3265   {
3266     FK_DIRECT, FK_SUPPRESS, modeFlag,
3267     "sysdirerrors",
3268     FLG_SYSTEMDIRERRORS,
3269     "report errors in files in system directories (set by -sysdirs)",
3270     NULL, 0, 0
3271   },
3272   {
3273     FK_DIRECT, FK_MACROS, plainFlag,
3274     "sysdirexpandmacros",
3275     FLG_SYSTEMDIREXPAND,
3276     "expand macros in system directories regardless of other settings, "
3277     "except for macros corresponding to names defined in a load library",
3278     NULL, 0, 0
3279   },
3280
3281   {
3282     FK_DIRECT, FK_HEADERS, globalExtraArgFlag,
3283     "I<directory>",
3284     FLG_INCLUDEPATH,
3285     "add to C include path",
3286     NULL, 0, 0
3287   },
3288   {
3289     FK_DIRECT, FK_SPEC, globalExtraArgFlag,
3290     "S<directory>",
3291     FLG_SPECPATH,
3292     "add to spec path",
3293     NULL, 0, 0
3294   },
3295   {
3296     FK_EXPORT, FK_SPEC, specialFlag,
3297     "exportany",
3298     FLG_EXPORTANY,
3299     "variable, function or type exported but not specified",
3300     "A variable, function or type is exported, but not specified.",
3301     0, 0
3302   },
3303   {
3304     FK_EXPORT, FK_SPEC, modeFlag,
3305     "exportfcn",
3306     FLG_EXPORTFCN,
3307     "function exported but not specified",
3308     "A function is exported, but not specified.", 0, 0
3309   },
3310   {
3311     FK_EXPORT, FK_SPEC, modeFlag,
3312     "exportmacro",
3313     FLG_EXPORTMACRO,
3314     "expanded macro exported but not specified",
3315     "A macro is exported, but not specified.", 0, 0
3316   },
3317   {
3318     FK_EXPORT, FK_SPEC, modeFlag,
3319     "exporttype",
3320     FLG_EXPORTTYPE,
3321     "type definition exported but not specified",
3322     "A type is exported, but not specified.", 0, 0
3323   },
3324   {
3325     FK_EXPORT, FK_SPEC, modeFlag,
3326     "exportvar",
3327     FLG_EXPORTVAR,
3328     "variable exported but not specified",
3329     "A variable is exported, but not specified.", 0, 0
3330   },
3331   {
3332     FK_EXPORT, FK_SPEC, modeFlag,
3333     "exportconst",
3334     FLG_EXPORTCONST,
3335     "constant exported but not specified",
3336     "A constant is exported, but not specified.", 0, 0
3337   },
3338   {
3339     FK_EXPORT, FK_SPEC, modeFlag,
3340     "exportiter",
3341     FLG_EXPORTITER,
3342     "constant exported but not specified",
3343     "A constant is exported, but not specified.", 0, 0
3344   },
3345
3346   {
3347     FK_FORMAT, FK_DISPLAY, valueFlag,
3348     "linelen",
3349     FLG_LINELEN,
3350     "set length of messages (number of chars)",
3351     NULL, 0, 0
3352   },
3353   {
3354     FK_FORMAT, FK_DISPLAY, valueFlag,
3355     "indentspaces",
3356     FLG_INDENTSPACES,
3357     "set number of spaces to indent sub-messages",
3358     NULL, 0, 0
3359   },
3360   {
3361     FK_FORMAT, FK_DISPLAY, valueFlag,
3362     "locindentspaces",
3363     FLG_LOCINDENTSPACES,
3364     "set number of spaces to indent sub-messages that start with file locations",
3365     NULL, 0, 0
3366   },
3367   {
3368     FK_FORMAT, FK_DISPLAY, plainFlag,
3369     "showdeephistory",
3370     FLG_SHOWDEEPHISTORY,
3371     "show all available information about storage mentioned in warnings",
3372     NULL, 0, 0
3373   },
3374   {
3375     FK_FORMAT, FK_DISPLAY, plainFlag,
3376     "showcolumn",
3377     FLG_SHOWCOL,
3378     "show column number where error is found",
3379     NULL, 0, 0
3380   },
3381   {
3382     FK_FORMAT, FK_DISPLAY, plainFlag,
3383     "showloadloc",
3384     FLG_SHOWLOADLOC,
3385     "show location information for load files",
3386     NULL, 0, 0
3387   },
3388   {
3389     FK_FORMAT, FK_DISPLAY, globalFileFlag,
3390     "csv",
3391     FLG_CSV,
3392     "produce comma-separated values (CSV) warnings output file",
3393     NULL, 0, 0
3394   },
3395   {
3396     FK_FORMAT, FK_DISPLAY, plainFlag,
3397     "csvoverwrite",
3398     FLG_CSVOVERWRITE,
3399     "overwrite exisiting CVS output file",
3400     NULL, 0, 0
3401   },
3402   {
3403     FK_FORMAT, FK_DISPLAY, plainFlag,
3404     "parenfileformat",
3405     FLG_PARENFILEFORMAT,
3406     "show column number where error is found",
3407     NULL, 0, 0
3408   },
3409   {
3410     FK_FORMAT, FK_DISPLAY, plainFlag,
3411     "htmlfileformat",
3412     FLG_HTMLFILEFORMAT,
3413     "show file locations as links",
3414     NULL, 0, 0
3415   },
3416   {
3417     FK_FORMAT, FK_NONE, plainFlag,
3418     "showfunc",
3419     FLG_SHOWFUNC,
3420     "show name of function containing error",
3421     NULL, 0, 0
3422   },
3423   {
3424     FK_FORMAT, FK_NONE, plainFlag,
3425     "showallconjs",
3426     FLG_SHOWALLCONJS,
3427     "show all possible types",
3428     "When a library function is declared with multiple possible type, the "
3429     "alternate types are shown only if +showallconjs.", 
3430     0, 0
3431   },
3432   {
3433     FK_LIBS, FK_NONE, plainFlag, 
3434     "impconj",
3435     FLG_IMPCONJ, 
3436     "make all alternate types implicit (useful for making system libraries",
3437     NULL, 0, 0
3438   } ,
3439   {
3440     FK_GLOBAL, FK_ERRORS, globalValueFlag,
3441     "expect",
3442     FLG_EXPECT,
3443     "expect <int> code errors",
3444     NULL, 0, 0
3445   },
3446   {
3447     FK_GLOBAL, FK_ERRORS, globalValueFlag,
3448     "lclexpect",
3449     FLG_LCLEXPECT,
3450     "expect <int> spec errors",
3451     NULL, 0, 0
3452   },
3453   {
3454     FK_GLOBAL, FK_USE, idemSpecialFlag,
3455     "partial",
3456     FLG_PARTIAL,
3457     "check as partial system (-specundef, -declundef, -exportlocal, "
3458     "don't check macros in headers without corresponding .c files)",
3459     NULL, 0, 0
3460   },
3461
3462   /*
3463   ** Appendix D. Specifications 
3464   */
3465
3466   {
3467     FK_HEADERS, FK_SPEC, globalFlag,
3468     "lh",
3469     FLG_DOLH,
3470     "generate .lh files", NULL,
3471     0, 0
3472   },
3473   {
3474     FK_HEADERS, FK_SPEC, globalFlag,
3475     "lcs",
3476     FLG_DOLCS,
3477     "generate .lcs files", NULL,
3478     0, 0
3479   },
3480
3481   /*
3482   ** 1. Operation
3483   */
3484
3485   {
3486     FK_HELP, FK_NONE, plainFlag,
3487     "warnflags",
3488     FLG_WARNFLAGS,
3489     "warn when command line sets flag in abnormal way",
3490     "Command line sets flag in abnormal way",
3491     0, 0
3492   },
3493   {
3494     FK_HELP, FK_NONE, plainFlag,
3495     "warnrc",
3496     FLG_WARNRC,
3497     "warn when there are problems with reading the initialization files",
3498     "There was a problem reading an initialization file",
3499     0, 0
3500   },
3501   {
3502     FK_HELP, FK_NONE, plainFlag,
3503     "badflag",
3504     FLG_BADFLAG,
3505     "warn about bad command line flags", 
3506     "A flag is not recognized or used in an incorrect way",
3507     0, 0
3508   },
3509   {
3510     FK_HELP, FK_NONE, plainFlag,
3511     "fileextensions",
3512     FLG_FILEEXTENSIONS,
3513     "warn when command line file does not have a recognized extension",
3514     NULL, 0, 0
3515   },
3516   {
3517     FK_HELP, FK_NONE, globalExtraArgFlag,
3518     "help",
3519     FLG_HELP,
3520     "-help <flags> will describe flags",
3521     "Display help",
3522     0, 0
3523   },
3524   {
3525     FK_INIT, FK_FILES, globalFileFlag,
3526     "f",
3527     FLG_OPTF,
3528     "read an options file (default ~/.splintrc not loaded)",
3529     "Read an options file (instead of loading default ~/.splintc)",
3530     0, 0
3531   },
3532   {
3533     FK_INIT, FK_FILES, globalFileFlag,
3534     "i",
3535     FLG_INIT,
3536     "set LCL initilization file",
3537     NULL, 0, 0
3538   },
3539   {
3540     FK_INIT, FK_FILES, globalFlag,
3541     "nof",
3542     FLG_NOF,
3543     "do not read options file",
3544     "Do not read the default options file (~/.splintrc)",
3545     0, 0
3546   },
3547   {
3548     FK_INIT, FK_COMMENTS, charFlag,
3549     "commentchar",
3550     FLG_COMMENTCHAR,
3551     "set marker character for syntactic comments (default is '@')",
3552     "Set the marker character for syntactic comments. Comments beginning "
3553     "with /*<char> are interpreted by Splint, where <char> is the "
3554     "comment marker character.",
3555     0, 0
3556   },
3557
3558   /*
3559   ** Limits 
3560   */
3561
3562   {
3563     FK_LIMITS, FK_ANSI, modeValueFlag,
3564     "controlnestdepth",
3565     FLG_CONTROLNESTDEPTH,
3566     "set maximum nesting depth of compound statements, iteration control "
3567     "structures, and selection control structures (ANSI89 minimum is 15; ISO99 is 63)",
3568     "Maximum number of control levels exceeded.",
3569     0, 0
3570   },
3571   {
3572     FK_LIMITS, FK_ANSI, modeValueFlag,
3573     "stringliterallen",
3574     FLG_STRINGLITERALLEN,
3575     "set maximum length of string literals (ANSI89 minimum is 509; ISO99 is 4095)",
3576     "Maximum length of string literal exceeded.",
3577     0, 0
3578   },
3579   {
3580     FK_LIMITS, FK_ANSI, modeValueFlag,
3581     "numstructfields",
3582     FLG_NUMSTRUCTFIELDS,
3583     "set maximum number of fields in a struct or union (ANSI89 minimum is 127; ISO99 is 1023)",
3584     "Maximum number of fields in a struct or union exceeded.",
3585     0, 0
3586   },
3587   {
3588     FK_LIMITS, FK_ANSI, modeValueFlag,
3589     "numenummembers",
3590     FLG_NUMENUMMEMBERS,
3591     "set maximum number of members of an enum (ANSI89 minimum is 127; ISO99 is 1023)",
3592     "Limit on maximum number of members of an enum is exceeded.",
3593     0, 0
3594   },
3595   {
3596     FK_LIMITS, FK_ANSI, modeValueFlag,
3597     "includenest",
3598     FLG_INCLUDENEST,
3599     "set maximum number of nested #include files (ANSI89 minimum is 8; ISO99 is 63)",
3600     "Maximum number of nested #include files exceeded.",
3601     0, 0
3602   },
3603   {
3604     FK_LIMITS, FK_ANSI, specialFlag,
3605     "ansi89limits",
3606     FLG_ANSI89LIMITS,
3607     "check for violations of standard limits (controlnestdepth, "
3608     "stringliterallen, includenest, numstructfields, numenummembers) based on ANSI89 standard",
3609     NULL,
3610     0, 0
3611   },
3612   {
3613     FK_LIMITS, FK_ANSI, specialFlag,
3614     "iso99limits",
3615     FLG_ISO99LIMITS,
3616     "check for violations of standard limits (controlnestdepth, "
3617     "stringliterallen, includenest, numstructfields, numenummembers) based on ISO99 standard",
3618     NULL,
3619     0, 0
3620   },
3621
3622   {
3623     FK_PREPROC, FK_NONE, globalExtraArgFlag,
3624     "D<initializer>",
3625     FLG_DEFINE,
3626     "passed to pre-processor",
3627     NULL, 0, 0
3628   },
3629   {
3630     FK_PREPROC, FK_NONE, globalExtraArgFlag,
3631     "U<initializer>",
3632     FLG_UNDEFINE,
3633     "passed to pre-processor",
3634     NULL, 0, 0
3635   },
3636   {
3637     FK_PREPROC, FK_SYNTAX, plainFlag,
3638     "unrecogdirective",
3639     FLG_UNRECOGDIRECTIVE,
3640     "unrecognized pre-processor directive",
3641     "Pre-processor directive is not recognized.", 
3642     0, 0
3643   },
3644   {
3645     FK_SUPPRESS, FK_COMMENTS, globalFlag,
3646     "supcounts",
3647     FLG_SUPCOUNTS,
3648     "The number of errors detected does not match number in /*@i<n>@*/.",
3649     NULL, 0, 0
3650   },
3651   {
3652     FK_SUPPRESS, FK_ERRORS, valueFlag,
3653     "limit",
3654     FLG_LIMIT,
3655     "limit <int> consecutive repeated errors",
3656     NULL, 0, 0
3657   },
3658   {
3659     FK_SYNTAX, FK_NONE, plainFlag,
3660     "syntax",
3661     FLG_SYNTAX,
3662     "syntax error in parsing",
3663     "Code cannot be parsed.  For help on parse errors, see splint -help parseerrors.", 
3664     0, 0
3665   },
3666   {
3667     FK_SYNTAX, FK_NONE, plainFlag,
3668     "trytorecover",
3669     FLG_TRYTORECOVER,
3670     "try to recover from parse error",
3671     "Try to recover from parse error.  It really means try - this doesn't usually work.", 0, 0
3672   },
3673   {
3674     FK_SYNTAX, FK_PREPROC, plainFlag,
3675     "preproc",
3676     FLG_PREPROC,
3677     "preprocessing error",
3678     "Preprocessing error.",
3679     0, 0
3680   },
3681
3682   {
3683     FK_TYPE, FK_NONE, plainFlag,
3684     "type",
3685     FLG_TYPE,
3686     "type mismatch",
3687     "Types are incompatible.",
3688     0, 0
3689   },
3690
3691   {
3692     FK_TYPE, FK_NONE, plainFlag,
3693     "stringliteraltoolong",
3694     FLG_STRINGLITTOOLONG,
3695     "string literal too long for character array",
3696     "A string literal is assigned to a char array too small to hold it.",
3697     0, 0
3698   },
3699   {
3700     FK_TYPE, FK_NONE, modeFlag,
3701     "stringliteralnoroomfinalnull",
3702     FLG_STRINGLITNOROOMFINALNULL,
3703     "string literal leaves no room for null terminator",
3704     "A string literal is assigned to a char array that is not big enough to hold the final null terminator.  This may not be a problem because a null character has been explictedly included in the string literal using an escape sequence",
3705     0, 0
3706   },
3707   {
3708     FK_TYPE, FK_NONE, modeFlag,
3709     "stringliteralnoroom",
3710     FLG_STRINGLITNOROOM,
3711     "string literal leaves no room for null terminator",
3712     "A string literal is assigned to a char array that is not big enough to hold the null terminator.",
3713     0, 0
3714   },
3715   {
3716     FK_TYPE, FK_NONE, modeFlag,
3717     "stringliteralsmaller",
3718     FLG_STRINGLITSMALLER,
3719     "string literal is smaller than the char array it is assigned to",
3720     "A string literal is assigned to a char array that smaller than the string literal needs.",
3721     0, 0
3722   },
3723   {
3724     FK_TYPE, FK_NONE, modeFlag,
3725     "enummembers",
3726     FLG_ENUMMEMBERS,
3727     "enum members must be int values",
3728     "Type of initial values for enum members must be int.",
3729     0, 0
3730   },
3731
3732   {
3733     FK_TYPE, FK_NONE, plainFlag,
3734     "formattype",
3735     FLG_FORMATTYPE,
3736     "type-mismatch in parameter corresponding to format code in a printf or scanf-like function",
3737     "Type of parameter is not consistent with corresponding code in format string.",
3738     0, 0
3739   },
3740   {
3741     FK_TYPE, FK_NONE, modeFlag,
3742     "formatconst",
3743     FLG_FORMATCONST,
3744     "format parameter is not a string constant (hence variable arguments cannot be typechecked)",
3745     "Format parameter is not known at compile-time.  This can lead to security vulnerabilities because the arguments cannot be type checked.",
3746     0, 0
3747   },
3748   {
3749     FK_TYPE, FK_NONE, plainFlag,
3750     "formatcode",
3751     FLG_FORMATCODE,
3752     "invalid format code in format string for printf or scanf-like function",
3753     "Format code in a format string is not valid.",
3754     0, 0
3755   },
3756   {
3757     FK_TYPEEQ, FK_ABSTRACT, modeFlag,
3758     "forwarddecl",
3759     FLG_FORWARDDECL,
3760     "forward declarations of pointers to abstract representation match abstract type",
3761     NULL, 0, 0
3762   },
3763   {
3764     FK_TYPEEQ, FK_ABSTRACT, modeFlag,
3765     "voidabstract",
3766     FLG_ABSTVOIDP,
3767     "void * matches pointers to abstract types, casting ok (dangerous)",
3768     "A pointer to void is cast to a pointer to an abstract type (or vice versa).",
3769     0, 0
3770   },
3771   {
3772     FK_TYPEEQ, FK_POINTER, plainFlag,
3773     "castfcnptr",
3774     FLG_CASTFCNPTR,
3775     "a pointer to a function is cast to a pointer to void (or vice versa)",
3776     "A pointer to a function is cast to (or used as) a pointer to void (or vice versa).",
3777     0, 0
3778   },
3779   {
3780     FK_TYPEEQ, FK_ARRAY, modeFlag,
3781     "charindex",
3782     FLG_CHARINDEX,
3783     "char can be used to index arrays",
3784     "To allow char types to index arrays, use +charindex.", 0, 0
3785   },
3786   {
3787     FK_TYPEEQ, FK_ARRAY, modeFlag,
3788     "enumindex",
3789     FLG_ENUMINDEX,
3790     "enum can be used to index arrays",
3791     "To allow enum types to index arrays, use +enumindex.", 0, 0
3792   },
3793   {
3794     FK_TYPEEQ, FK_BOOL, modeFlag,
3795     "boolint",
3796     FLG_BOOLINT,
3797     "bool and int are equivalent",
3798     "To make bool and int types equivalent, use +boolint.",
3799     0, 0
3800   },
3801   {
3802     FK_TYPEEQ, FK_NONE, modeFlag,
3803     "charint",
3804     FLG_CHARINT,
3805     "char and int are equivalent",
3806     "To make char and int types equivalent, use +charint.",
3807     0, 0
3808   },
3809   {
3810     FK_TYPEEQ, FK_NONE, modeFlag,
3811     "enumint",
3812     FLG_ENUMINT,
3813     "enum and int are equivalent",
3814     "To make enum and int types equivalent, use +enumint.",
3815     0, 0
3816   },
3817   {
3818     FK_TYPEEQ, FK_NONE, modeFlag,
3819     "longint",
3820     FLG_LONGINT,
3821     "long int and int are equivalent",
3822     "To make long int and int types equivalent, use +longint.",
3823     0, 0
3824   },
3825   {
3826     FK_TYPEEQ, FK_NONE, modeFlag,
3827     "shortint",
3828     FLG_SHORTINT,
3829     "short int and int are equivalent",
3830     "To make short int and int types equivalent, use +shortint.",
3831     0, 0
3832   },
3833   {
3834     FK_TYPEEQ, FK_NONE, modeFlag,
3835     "floatdouble",
3836     FLG_FLOATDOUBLE,
3837     "float and double are equivalent",
3838     "To make float and double types equivalent, use +floatdouble.",
3839     0, 0
3840   },
3841   {
3842     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3843     "ignorequals",
3844     FLG_IGNOREQUALS,
3845     "ignore type qualifiers (long, short, unsigned)",
3846     "To ignore type qualifiers in type comparisons use +ignorequals.",
3847     0, 0
3848   },
3849   {
3850     FK_TYPEEQ, FK_SYNTAX, plainFlag,
3851     "duplicatequals",
3852     FLG_DUPLICATEQUALS,
3853     "report duplicate type qualifiers (e.g., unsigned unsigned)",
3854     "Duplicate type qualifiers not supported by ISO standard.",
3855     0, 0
3856   },
3857   {
3858     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3859     "ignoresigns",
3860     FLG_IGNORESIGNS,
3861     "ignore signs in type comparisons (unsigned matches signed)",
3862     "To ignore signs in type comparisons use +ignoresigns",
3863     0, 0
3864   },
3865   {
3866     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3867     "numliteral",
3868     FLG_NUMLITERAL,
3869     "int literals can be reals",
3870     "An int literal is used as any numeric type (including float and long long). Use +numliteral to "
3871     "allow int literals to be used as any numeric type.",
3872     0, 0
3873   },
3874   {
3875     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3876     "charintliteral",
3877     FLG_CHARINTLITERAL,
3878     "character constants (e.g., 'a') can be used as ints",
3879     "A character constant is used as an int. Use +charintliteral to "
3880     "allow character constants to be used as ints.  (This is safe "
3881     "since the actual type of a char constant is int.)",
3882     0, 0
3883   },
3884   {
3885     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3886     "relaxquals",
3887     FLG_RELAXQUALS,
3888     "report qualifier mismatches only if dangerous",
3889     "To allow qualifier mismatches that are not dangerous, use +relaxquals.", 0, 0
3890   },
3891   {
3892     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3893     "relaxtypes",
3894     FLG_RELAXTYPES,
3895     "allow all numeric types to match",
3896     "To allow all numeric types to match, use +relaxtypes.", 0, 0
3897   },
3898   {
3899     FK_TYPEEQ, FK_NONE, modeFlag,
3900     "charunsignedchar",
3901     FLG_CHARUNSIGNEDCHAR,
3902     "allow char and unsigned char types to match",
3903     "To allow char and unsigned char types to match use +charunsignedchar.", 
3904     0, 0
3905   },
3906   {
3907     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3908     "matchanyintegral",
3909     FLG_MATCHANYINTEGRAL,
3910     "allow any intergral type to match an arbitrary integral type (e.g., dev_t)",
3911     "To allow arbitrary integral types to match any integral type, use +matchanyintegral.",
3912     0, 0
3913   },
3914   {
3915     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3916     "longunsignedintegral",
3917     FLG_LONGUNSIGNEDINTEGRAL,
3918     "allow long unsigned type to match an arbitrary integral type (e.g., dev_t)",
3919     "To allow arbitrary integral types to match long unsigned, use +longunsignedintegral.",
3920     0, 0
3921   },
3922   {
3923     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3924     "longintegral",
3925     FLG_LONGINTEGRAL,
3926     "allow long type to match an arbitrary integral type (e.g., dev_t)",
3927     "To allow arbitrary integral types to match long unsigned, use +longintegral.",
3928     0, 0
3929   },
3930   {
3931     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3932     "longunsignedunsignedintegral",
3933     FLG_LONGUNSIGNEDUNSIGNEDINTEGRAL,
3934     "allow long unsigned type to match an arbitrary unsigned integral type (e.g., size_t)",
3935     "To allow arbitrary unsigned integral types to match long unsigned, "
3936     "use +longunsignedunsignedintegral.",
3937     0, 0
3938   },
3939   {
3940     FK_TYPEEQ, FK_NUMBERS, modeFlag,
3941     "longsignedintegral",
3942     FLG_LONGSIGNEDINTEGRAL,
3943     "allow long type to match an arbitrary signed integral type (e.g., ssize_t)",
3944     "To allow arbitrary signed integral types to match long unsigned, use +longsignedintegral.",
3945     0, 0
3946   },
3947   {
3948     FK_TYPEEQ, FK_POINTER, plainFlag,
3949     "zeroptr",
3950     FLG_ZEROPTR,
3951     "treat 0 as a pointer",
3952     NULL, 0, 0
3953   },
3954   {
3955     FK_TYPEEQ, FK_BOOL, modeFlag,
3956     "zerobool",
3957     FLG_ZEROBOOL,
3958     "treat 0 as a boolean",
3959     NULL, 0, 0
3960   },
3961   {
3962     FK_UNRECOG, FK_DISPLAY, plainFlag,
3963     "repeatunrecog",
3964     FLG_REPEATUNRECOG,
3965     "do not suppress repeated unrecognized identifier messages (instead of only reporting the first error)",
3966     "Identifier used in code has not been declared. (Message repeated for future uses in this file.)",
3967     0, 0
3968   },
3969   {
3970     FK_UNRECOG, FK_DISPLAY, plainFlag,
3971     "sysunrecog",
3972     FLG_SYSTEMUNRECOG,
3973     "report unrecognized identifiers with system (__) prefix",
3974     "Identifier used in code has not been declared. (Message repeated for "
3975     "future uses in this file.)  Use +gnuextensions to make Splint "
3976     "recognize some keywords that are gnu extensions.",
3977     0, 0
3978   },
3979   {
3980     FK_UNRECOG, FK_NONE, plainFlag,
3981     "unrecog",
3982     FLG_UNRECOG,
3983     "unrecognized identifier",
3984     "Identifier used in code has not been declared.", 0, 0
3985   },
3986
3987
3988   {
3989     FK_DECL, FK_TYPE, plainFlag,
3990     "annotationerror",
3991     FLG_ANNOTATIONERROR,
3992     "annotation is used in inconsistent location",
3993     "A declaration uses an invalid annotation.",
3994     0, 0
3995   } ,
3996   {
3997     FK_DECL, FK_TYPE, plainFlag,
3998     "commenterror",
3999     FLG_COMMENTERROR,
4000     "inconsistent syntactic comment",
4001     "A syntactic comment is used inconsistently.",
4002     0, 0
4003   } ,
4004
4005   /*
4006   ** Use Warnings
4007   */
4008
4009   {
4010     FK_WARNUSE, FK_NONE, plainFlag,
4011     "warnuse",
4012     FLG_WARNUSE,
4013     "warn when declaration marked with warn is used",
4014     "Declaration marked with warn clause is used (can be suppresed by more specific flags).",
4015     0, 0
4016   },
4017   {
4018     FK_WARNUSE, FK_SECURITY, modeFlag,
4019     "bufferoverflow",
4020     FLG_BUFFEROVERFLOW,
4021     "possible buffer overflow vulnerability",
4022     "Use of function that may lead to buffer overflow.",
4023     0, 0
4024   }, 
4025   {
4026     FK_WARNUSE, FK_SECURITY, modeFlag,
4027     "bufferoverflowhigh",
4028     FLG_BUFFEROVERFLOWHIGH,
4029     "likely buffer overflow vulnerability",
4030     "Use of function that may lead to buffer overflow.",
4031     0, 0
4032   }, 
4033   {
4034     FK_WARNUSE, FK_SECURITY, modeFlag,
4035     "implementationoptional",
4036     FLG_IMPLEMENTATIONOPTIONAL,
4037     "declarator is implementation optional (ISO99 does not require an implementation to provide it)",
4038     "Use of a declarator that is implementation optional, not required by ISO99.",
4039     0, 0
4040   }, 
4041   {
4042     FK_WARNUSE, FK_NONE, modeFlag,
4043     "legacy",
4044     FLG_LEGACY,
4045     "legacy declaration in Unix Standard",
4046     "Use of a declarator that is marked as a legacy entry in the Unix Standard.",
4047     0, 0
4048   }, 
4049   {
4050     FK_WARNUSE, FK_SECURITY, modeFlag,
4051     "multithreaded",
4052     FLG_MULTITHREADED,
4053     "function is not reentrant",
4054     "Non-reentrant function should not be used in multithreaded code.",
4055     0, 0
4056   },
4057   {
4058     FK_WARNUSE, FK_SECURITY, modeFlag,
4059     "portability",
4060     FLG_PORTABILITY,
4061     "function may have undefined behavior",
4062     "Use of function that may have implementation-dependent behavior.",
4063     0, 0
4064   },
4065   {
4066     FK_WARNUSE, FK_SECURITY, modeFlag,
4067     "superuser",
4068     FLG_SUPERUSER,
4069     "function is restricted to superusers",
4070     "Call to function restricted to superusers.",
4071     0, 0
4072   },
4073   {
4074     FK_WARNUSE, FK_SECURITY, modeFlag,
4075     "toctou",
4076     FLG_TOCTOU,
4077     "possible time of check, time of use vulnerability",
4078     "Possible time of check, time of use vulnerability.",
4079     0, 0
4080   },
4081   {
4082     FK_WARNUSE, FK_SECURITY, modeFlag,
4083     "unixstandard",
4084     FLG_UNIXSTANDARD,
4085     "function is not required in Standard UNIX Specification",
4086     "Use of function that need not be provided by UNIX implementations",
4087     0, 0
4088   },
4089
4090   /*
4091   ** ITS4 Compability Flags
4092   **
4093   ** These flags flags must appear in order (most severe -> weakest).
4094   */
4095
4096   {
4097     FK_ITS4, FK_SECURITY, specialFlag,
4098     "its4mostrisky",
4099     FLG_ITS4MOSTRISKY,
4100     "most risky security vulnerabilities (from its4 database)",
4101     "Security vulnerability classified as most risky in its4 database.",
4102     0, 0
4103   },
4104   {
4105     FK_ITS4, FK_SECURITY, specialFlag,
4106     "its4veryrisky",
4107     FLG_ITS4VERYRISKY,
4108     "very risky security vulnerabilities (from its4 database)",
4109     "Security vulnerability classified as very risky in its4 database.",
4110     0, 0
4111   },
4112   {
4113     FK_ITS4, FK_SECURITY, specialFlag,
4114     "its4risky",
4115     FLG_ITS4RISKY,
4116     "risky security vulnerabilities (from its4 database)",
4117     "Security vulnerability classified as risky in its4 database.",
4118     0, 0
4119   },
4120   {
4121     FK_ITS4, FK_SECURITY, specialFlag,
4122     "its4moderate",
4123     FLG_ITS4MODERATERISK,
4124     "moderately risky security vulnerabilities (from its4 database)",
4125     "Security vulnerability classified as moderate risk in its4 database.",
4126     0, 0
4127   },
4128   {
4129     FK_ITS4, FK_SECURITY, specialFlag,
4130     "its4low",
4131     FLG_ITS4LOWRISK,
4132     "risky security vulnerabilities (from its4 database)",
4133     "Security vulnerability classified as risky in its4 database.",
4134     0, 0
4135   },
4136
4137   /*
4138   ** Syntactic comments
4139   */
4140
4141   {
4142     FK_SYNCOMMENTS, FK_SUPPRESS, plainFlag,
4143     "nocomments",
4144     FLG_NOCOMMENTS,
4145     "ignore all stylized comments",
4146     NULL, 0, 0
4147   },
4148   {
4149     FK_SYNCOMMENTS, FK_ABSTRACT, plainFlag,
4150     "noaccess",
4151     FLG_NOACCESS,
4152     "ignore access comments",
4153     NULL, 0, 0
4154   },
4155
4156   {
4157     FK_SYNCOMMENTS, FK_SYNTAX, plainFlag,
4158     "unrecogcomments",
4159     FLG_UNRECOGCOMMENTS,
4160     "stylized comment is unrecognized",
4161     "Word after a stylized comment marker does not correspond to a "
4162     "stylized comment.",
4163     0, 0
4164   },
4165   {
4166     FK_SYNCOMMENTS, FK_SYNTAX, plainFlag,
4167     "unrecogflagcomments",
4168     FLG_UNRECOGFLAGCOMMENTS,
4169     "stylized flag comment uses an unrecognized flag",
4170     "Semantic comment attempts to set a flag that is not recognized.",
4171     0, 0
4172   },
4173   {
4174     FK_SYNCOMMENTS, FK_SUPPRESS, modeFlag,
4175     "tmpcomments",
4176     FLG_TMPCOMMENTS,
4177     "interpret t comments (ignore errors in lines marked with /*@t<n>@*/", 
4178     NULL, 0, 0
4179   },
4180   {
4181     FK_SYNCOMMENTS, FK_SUPPRESS, plainFlag,
4182     "lintcomments",
4183     FLG_LINTCOMMENTS,
4184     "interpret traditional lint comments (/*FALLTHROUGH*/, /*NOTREACHED*/)",
4185     NULL, 0, 0
4186   },
4187   {
4188     FK_SYNCOMMENTS, FK_SUPPRESS, modeFlag,
4189     "warnlintcomments",
4190     FLG_WARNLINTCOMMENTS,
4191     "warn when a traditional lint comment is used",
4192     "A traditional lint comment is used. Some traditional lint comments "
4193     "are interpreted by Splint to enable easier checking of legacy "
4194     "code. It is preferable to replace these comments with the "
4195     "suggested Splint alternative.",
4196     0, 0
4197   },
4198
4199   /*
4200   ** Comments
4201   */
4202
4203   {
4204     FK_COMMENTS, FK_SYNTAX, plainFlag,
4205     "continuecomment",
4206     FLG_CONTINUECOMMENT,
4207     "line continuation marker (\\) in comment before */ on same line",
4208     "A line continuation marker (\\) appears inside a comment on the same "
4209     "line as the comment close. Preprocessors should handle this "
4210     "correctly, but it causes problems for some preprocessors.",
4211     0, 0
4212   },
4213   {
4214     FK_COMMENTS, FK_SYNTAX, plainFlag,
4215     "slashslashcomment",
4216     FLG_SLASHSLASHCOMMENT,
4217     "use of // comment", 
4218     "A // comment is used.  ISO C99 allows // comments, but earlier standards did not.",
4219     0, 0
4220   },
4221   {
4222     FK_COMMENTS, FK_SYNTAX, plainFlag,
4223     "nestcomment",
4224     FLG_NESTCOMMENT,
4225     "comment begins inside comment", 
4226     "A comment open sequence (/*) appears within a comment.  This usually "
4227     "means an earlier comment was not closed.",
4228     0, 0
4229   },
4230
4231   /*
4232   ** Flags for controlling warning message printing.
4233   */
4234
4235   /* Display */
4236
4237   {
4238     FK_DISPLAY, FK_ERRORS, plainFlag,
4239     "quiet",
4240     FLG_QUIET,
4241     "suppress herald and error count",
4242     NULL, 0, 0
4243   },
4244
4245   /*
4246   ** Default is to send messages, warnings and errors to stderr
4247   */
4248
4249   {
4250     FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4251     "messagestreamstdout",
4252     FLG_MESSAGESTREAMSTDOUT,
4253     "send status messages to standard output stream",
4254     NULL, 0, 0
4255   },
4256   {
4257     FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4258     "messagestreamstderr",
4259     FLG_MESSAGESTREAMSTDERR,
4260     "send status messages to standard error stream",
4261     NULL, 0, 0
4262   },
4263   {
4264     FK_DISPLAY, FK_ERRORS, globalStringFlag, ARG_FILE,
4265     "messagestream",
4266     FLG_MESSAGESTREAM,
4267     "send status messages to <file>",
4268     NULL, 0, 0
4269   },
4270
4271   {
4272     FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4273     "warningstreamstdout",
4274     FLG_WARNINGSTREAMSTDOUT,
4275     "send warnings to standard output stream",
4276     NULL, 0, 0
4277   },
4278   {
4279     FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4280     "warningstreamstderr",
4281     FLG_WARNINGSTREAMSTDERR,
4282     "send warnings to standard error stream",
4283     NULL, 0, 0
4284   },
4285   {
4286     FK_DISPLAY, FK_ERRORS, globalStringFlag, ARG_FILE,
4287     "warningstream",
4288     FLG_WARNINGSTREAM,
4289     "send warnings to <file>",
4290     NULL, 0, 0
4291   },
4292
4293   {
4294     FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4295     "errorstreamstdout",
4296     FLG_ERRORSTREAMSTDOUT,
4297     "send fatal errors to standard output stream",
4298     NULL, 0, 0
4299   },
4300   {
4301     FK_DISPLAY, FK_ERRORS, idemGlobalFlag,
4302     "errorstreamstderr",
4303     FLG_ERRORSTREAMSTDERR,
4304     "send fatal errors to standard error stream",
4305     NULL, 0, 0
4306   },
4307   {
4308     FK_DISPLAY, FK_ERRORS, globalStringFlag, ARG_FILE,
4309     "errorstream",
4310     FLG_ERRORSTREAM,
4311     "send fatal errors to <file>",
4312     NULL, 0, 0
4313   },
4314   
4315   {
4316     FK_DISPLAY, FK_ERRORS, globalFlag,
4317     "streamoverwrite",
4318     FLG_STREAMOVERWRITE,
4319     "warn and exit if a stream output file would overwrite an existing file",
4320     NULL, 0, 0
4321   },
4322
4323
4324   {
4325     FK_DISPLAY, FK_ERRORS, plainFlag,
4326     "showsummary",
4327     FLG_SHOWSUMMARY,
4328     "show summary of all errors reported and suppressed",
4329     NULL, 0, 0
4330   },
4331   {
4332     FK_DISPLAY, FK_FILES, plainFlag,
4333     "showscan",
4334     FLG_SHOWSCAN,
4335     "show file names are they are processed",
4336     NULL, 0, 0
4337   },
4338   {
4339     FK_DISPLAY, FK_FILES, plainFlag,
4340     "warnsysfiles",
4341     FLG_WARNSYSFILES,
4342     "Splint has been run on a system file, by default no errors are reported for system files.  Use +systemdirerrors if you want splint to report errors in system files.  A file is considered a system file if it is in a system directory or a subdirectory of a system directory.  The sysdirs flag can be used to control the directories treated as system directories.",
4343     NULL, 0, 0
4344   },
4345   {
4346     FK_DISPLAY, FK_NONE, globalFlag,
4347     "stats",
4348     FLG_STATS,
4349     "display lines processed and time",
4350     NULL, 0, 0
4351   },
4352   {
4353     FK_DISPLAY, FK_NONE, globalFlag,
4354     "timedist",
4355     FLG_TIMEDIST,
4356     "display time distribution",
4357     NULL, 0, 0
4358   },
4359   {
4360     FK_DISPLAY, FK_USE, globalFlag,
4361     "showalluses",
4362     FLG_SHOWUSES,
4363     "show sorted list of uses of all globals",
4364     NULL, 0, 0
4365   },
4366
4367   /* Hints */
4368
4369   {
4370     FK_HINTS, FK_FORMAT, plainFlag,
4371     "hints",
4372     FLG_HINTS,
4373     "provide a hint the first time a particular warning appears",
4374     "Provide a hint the first time a particular warning appears", 
4375     0, 0
4376   },
4377   {
4378     FK_HINTS, FK_FORMAT, plainFlag,
4379     "forcehints",
4380     FLG_FORCEHINTS,
4381     "provide a hint for every warnings",
4382     "Provide a hint for every warning",
4383     0, 0
4384   },
4385
4386   /*
4387   ** Flags for debugging
4388   */
4389
4390   {
4391     FK_DEBUG, FK_NONE, valueFlag,
4392     "bugslimit",
4393     FLG_BUGSLIMIT,
4394     "set maximum number of bugs detected before giving up",
4395     NULL, 0, 0
4396   },
4397   {
4398     FK_DEBUG, FK_BOUNDS, plainFlag,
4399     "debugfcnconstraint",
4400     FLG_DEBUGFUNCTIONCONSTRAINT,
4401     "debug function constraints",
4402     "Perform buffer overflow checking even if the errors would be surpressed.",
4403     0, 0
4404   },
4405   {
4406     FK_DEBUG, FK_NONE, specialDebugFlag,
4407     "grammar",
4408     FLG_GRAMMAR, 
4409     "debug parsing", NULL,
4410     0, 0
4411   },
4412   {
4413     FK_DEBUG, FK_NONE, debugFlag,
4414     "keep",
4415     FLG_KEEP,
4416     "do not delete temporary files", NULL,
4417     0, 0
4418   },
4419   {
4420     FK_DEBUG, FK_NONE, debugFlag,
4421     "nopp",
4422     FLG_NOPP,
4423     "do not pre-process input files", NULL,
4424     0, 0
4425   },
4426   {
4427     FK_DEBUG, FK_NONE, debugFlag,
4428     "showsourceloc",
4429     FLG_SHOWSOURCELOC,
4430     "display the source code location where a warning is produced", NULL,
4431     0, 0
4432   },
4433 } ;
4434
4435
This page took 0.684753 seconds and 3 git commands to generate.