+ FK_USE, FK_TYPE, modeFlag,
+ "typeuse",
+ FLG_TYPEUNUSED,
+ "type declared but not used",
+ "A type is declared but not used. Use /*@unused@*/ in front of typedef to suppress messages.",
+ 0, 0
+ },
+ {
+ FK_USE, FK_NONE, modeFlag,
+ "varuse",
+ FLG_VARUNUSED,
+ "variable declared but not used",
+ "A variable is declared but never used. Use /*@unused@*/ in front "
+ "of declaration to suppress message.",
+ 0, 0
+ },
+ {
+ FK_USE, FK_COMPLETE, modeFlag,
+ "unusedspecial",
+ FLG_UNUSEDSPECIAL,
+ "unused declaration in special file (corresponding to .l or .y file)",
+ NULL, 0, 0
+ } ,
+
+ /* 13.2 Complete Programs */
+
+ {
+ FK_COMPLETE, FK_NONE, modeFlag,
+ "declundef",
+ FLG_DECLUNDEF,
+ "function or variable declared but never defined",
+ "A function or variable is declared, but not defined in any source code file.",
+ 0, 0
+ },
+ {
+ FK_COMPLETE, FK_SPEC, modeFlag,
+ "specundef",
+ FLG_SPECUNDEF,
+ "function or variable specified but never defined",
+ "A function or variable is declared in an .lcl file, but not defined in any source code file.",
+ 0, 0
+ },
+ {
+ FK_COMPLETE, FK_SPEC, plainFlag,
+ "specundecl",
+ FLG_SPECUNDECL,
+ "function or variable specified but never declared in a source file",
+ "A function or variable is declared in an .lcl file, but not declared "
+ "in any source code file.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_LIBS, plainFlag,
+ "newdecl",
+ FLG_NEWDECL,
+ "report new global declarations in source files",
+ "There is a new declaration that is not declared in a loaded library "
+ "or earlier file. (Use this flag to check for consistency "
+ "against a library.)",
+ 0, 0
+ },
+ {
+ FK_INIT, FK_SPEC, plainFlag,
+ "needspec",
+ FLG_NEEDSPEC,
+ "information in specifications is not also included in syntactic comments",
+ "There is information in the specification that is not duplicated "
+ "in syntactic comments. Normally, this is not an "
+ "error, but it may be useful to detect it to make "
+ "sure checking incomplete systems without the specifications will "
+ "still use this information.",
+ 0, 0
+ },
+
+ /*
+ ** 14. Libraries and Header File Inclusion
+ */
+
+ /* 14.1 Standard Libraries */
+
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "nolib",
+ FLG_NOLIB,
+ "do not load standard library",
+ NULL, 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "isolib",
+ FLG_ANSILIB,
+ "use normal standard library",
+ "Library based on the ISO standard library specification is used.",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "strictlib",
+ FLG_STRICTLIB,
+ "interpret standard library strictly",
+ "Stricter version of the standard library is used. (The default "
+ "library is standard.lcd; strict library is strict.lcd.)",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "unixlib",
+ FLG_UNIXLIB,
+ "use UNIX (sort-of) standard library",
+ "UNIX version of the standard library is used.",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "unixstrictlib",
+ FLG_UNIXSTRICTLIB,
+ "use strict version of UNIX (sort-of) library",
+ "strict version of the UNIX library is used.",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "posixlib",
+ FLG_POSIXLIB,
+ "use POSIX standard library",
+ "POSIX version of the standard library is used.",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "posixstrictlib",
+ FLG_POSIXSTRICTLIB,
+ "use strict POSIX standard library",
+ "POSIX version of the strict standard library is used.",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_INIT, idemGlobalFlag,
+ "whichlib",
+ FLG_WHICHLIB,
+ "show standard library filename",
+ NULL, 0, 0
+ },
+ {
+ FK_LIBS, FK_ANSI, plainFlag,
+ "warnposixheaders",
+ FLG_WARNPOSIX,
+ "a POSIX header is included, but the POSIX library is not used",
+ "Header name matches a POSIX header, but the POSIX library is not selected.",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_ANSI, plainFlag,
+ "warnunixlib",
+ FLG_WARNUNIXLIB,
+ "warn when the unix library is used",
+ "Unix library may not be compatible with all platforms",
+ 0, 0
+ },
+ {
+ FK_LIBS, FK_ANSI, plainFlag,
+ "usevarargs",
+ FLG_USEVARARGS,
+ "non-standard <varargs.h> included",
+ "Header <varargs.h> is not part of ANSI Standard. "
+ "Should use <stdarg.h> instead.",
+ 0, 0
+ },
+ {
+ FK_HEADERS, FK_FILES, plainFlag,
+ "caseinsensitivefilenames",
+ FLG_CASEINSENSITIVEFILENAMES,
+ "file names are case insensitive (file.h and FILE.H are the same file)",
+ NULL, 0, 0
+ },
+
+ /* 14.2 Generating Libraries */
+
+ {
+ FK_LIBS, FK_FILES, globalStringFlag, ARG_FILE,
+ "dump",
+ FLG_DUMP,
+ "save state for merging (default suffix .lcd)",
+ NULL, 0, 0
+ },
+ {
+ FK_LIBS, FK_FILES, globalStringFlag, ARG_FILE,
+ "load",
+ FLG_MERGE,
+ "load state from dump file (default suffix .lcd)",
+ NULL, 0, 0
+ },
+
+ /* 14.3 Header File Inclusion */
+
+ {
+ FK_HEADERS, FK_SPEED, globalFlag,
+ "singleinclude",
+ FLG_SINGLEINCLUDE,
+ "optimize header inclusion to eliminate redundant includes",
+ "When checking multiple files, each header file is processed only "
+ "once. This may change the meaning of the code, if the "
+ "same header file is included in different contexts (e.g., the "
+ "header file includes #if directives and the values are "
+ "different when it is included in different places.)",
+ 0, 0
+ },
+ {
+ FK_HEADERS, FK_SPEED, globalFlag,
+ "neverinclude",
+ FLG_NEVERINCLUDE,
+ "optimize header inclusion to not include any header files",
+ "Ignore header includes. Only works if relevant information is "
+ "loaded from a library.",
+ 0, 0
+ },
+ {
+ FK_HEADERS, FK_SPEED, globalFlag,
+ "skipsysheaders",
+ FLG_SKIPSYSHEADERS,
+ "do not include header files in system directories (set by -sysdirs)",
+ "Do not include header files in system directories (set by -sysdirs)",
+ 0, 0
+ },
+
+ /*
+ ** A. Operation?
+ */
+
+
+ /*
+ ** Syntax
+ */
+
+ {
+ FK_SYNTAX, FK_ANSI, plainFlag,
+ "gnuextensions",
+ FLG_GNUEXTENSIONS,
+ "support some gnu (gcc) language extensions",
+ "ANSI C does not allow some language features supported by gcc and other compilers. "
+ "Use +gnuextensions to allow some of these extensions.", 0, 0
+ },
+
+ /* Prototypes */
+
+ {
+ FK_PROTOS, FK_ANSI, modeFlag,
+ "noparams",
+ FLG_NOPARAMS,
+ "function declaration has no parameter list",
+ "A function declaration does not have a parameter list.",
+ 0, 0
+ },
+ {
+ FK_PROTOS, FK_ANSI, modeFlag,
+ "oldstyle",
+ FLG_OLDSTYLE,
+ "old style function definition",
+ "Function definition is in old style syntax. Standard prototype "
+ "syntax is preferred.",
+ 0, 0
+ },
+
+
+ /*
+ ** System functions
+ */
+
+ {
+ FK_SYSTEMFUNCTIONS, FK_TYPE, plainFlag,
+ "maintype",
+ FLG_MAINTYPE,
+ "type of main does not match expected type",
+ "The function main does not match the expected type.",
+ 0, 0
+ },
+ {
+ FK_SYSTEMFUNCTIONS, FK_BEHAVIOR, modeFlag,
+ "exitarg",
+ FLG_EXITARG,
+ "argument to exit has implementation defined behavior",
+ "The argument to exit should be 0, EXIT_SUCCESS or EXIT_FAILURE",
+ 0, 0
+ },
+
+ {
+ FK_DECL, FK_NONE, modeFlag,
+ "shadow",
+ FLG_SHADOW,
+ "declaration reuses name visible in outer scope",
+ "An outer declaration is shadowed by the local declaration.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_LIBS, modeFlag,
+ "incondefslib",
+ FLG_INCONDEFSLIB,
+ "function, variable or constant defined in a library is redefined with inconsistent type",
+ "A function, variable or constant previously defined in a library is "
+ "redefined with a different type.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_LIBS, modeFlag,
+ "overload",
+ FLG_WARNOVERLOAD,
+ "library function overloaded",
+ "A function, variable or constant defined in the library is redefined "
+ "with a different type.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_NONE, modeFlag,
+ "nestedextern",
+ FLG_NESTEDEXTERN,
+ "an extern declaration is inside a function scope",
+ "An extern declaration is used inside a function scope.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_NONE, modeFlag,
+ "redecl",
+ FLG_REDECL,
+ "function or variable redeclared",
+ "A function or variable is declared in more than one place. This is "
+ "not necessarily a problem, since the declarations are consistent.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_NONE, plainFlag,
+ "redef",
+ FLG_REDEF,
+ "function or variable redefined",
+ "A function or variable is redefined. One of the declarations should use extern.",
+ 0, 0
+ },
+ {
+ FK_DECL, FK_TYPE, modeFlag,
+ "imptype",
+ FLG_IMPTYPE,
+ "variable declaration has unknown (implicitly int) type",
+ "A variable declaration has no explicit type. The type is implicitly int.",
+ 0, 0
+ },
+
+ {
+ FK_DIRECT, FK_FILES, globalStringFlag, ARG_DIRECTORY,
+ "tmpdir",
+ FLG_TMPDIR,
+ "set directory for writing temp files",
+ NULL, 0, 0
+ },
+ {
+ FK_DIRECT, FK_FILES, globalStringFlag, ARG_PATH,
+ "larchpath",
+ FLG_LARCHPATH,
+ "set path for searching for library files (overrides LARCH_PATH environment variable)",
+ NULL, 0, 0
+ },
+ {
+ FK_DIRECT, FK_FILES, globalStringFlag, ARG_DIRECTORY,
+ "lclimportdir",
+ FLG_LCLIMPORTDIR,
+ "set directory to search for LCL import files (overrides LCLIMPORTDIR)",
+ NULL, 0, 0
+ },
+ {
+ FK_DIRECT, FK_FILES, globalStringFlag, ARG_PATH,
+ "sysdirs",
+ FLG_SYSTEMDIRS,
+ "set directories for system files (default /usr/include). Separate "
+ "directories with path separator (colons in Unix, semi-colons in Windows). "
+ "Flag settings propagate to files in a system directory. If "
+ "-sysdirerrors is set, no errors are reported for files in "
+ "system directories.",
+ NULL, 0, 0