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