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