⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lint.1

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 1
字号:
.TH LINT 1 .SH NAMElint \- a C program verifier.SH SYNOPSIS.B lint[.B \-abchnpuvx]file ....SH DESCRIPTION.I Lintattempts to detect features of the C program.I fileswhich arelikely to be bugs, or non-portable, or wasteful.It also checks the type usage of the program more strictlythan the compilers.Among the things which are currently found areunreachable statements,loops not entered at the top,automatic variables declared and not used,and logical expressions whose value is constant.Moreover, the usage of functions is checked to findfunctions which return values in some places and not in others,functions called with varying numbers of arguments,and functions whose values are not used..PPBy default, it is assumed that all the.I filesare to be loaded together; they are checked formutual compatibility.Function definitions for certain libraries are available to.IR lint ;these libraries are referred to by aconventional name,such as `-lm', in the style of.IR ld (1)..PPAny number of the options in the following listmay be used.The.SM.BR \-D "\*S,".SM.BR \-U "\*S,"and.SM.B \-Ioptions of.IR cc (1)are also recognized as separate arguments..TP.B pAttempt to check portability to the.I IBMand.I GCOSdialects of C..TP.B hApply a number of heuristic tests to attempt tointuit bugs, improve style, and reduce waste..TP.B bReport.I breakstatements that cannot be reached.(This is not the default because, unfortunately,most.I lexand many.I yaccoutputs produce dozens of such comments.).TP.B vSuppress complaints about unused arguments in functions..TP.B xReport variables referred to by extern declarations,but never used..TP.B aReport assignments of long values to int variables..TP.B cComplain about casts which have questionable portability..TP.B uDo not complain about functions and variables used and notdefined, or defined and not used (this is suitable for running.I linton a subset of files out of a larger program)..TP.B nDo not check compatibility against the standard library..PP.IR Exit (2)and other functions which do not returnare not understood; this causes various lies..PPCertain conventional comments in the C sourcewill change the behavior of.IR lint :.TP/*NOTREACHED*/at appropriate pointsstops comments about unreachable code..TP.RI /*VARARGS n */suppressesthe usual checking for variable numbers of argumentsin the following function declaration.The data types of the first.I narguments are checked;a missing.I nis taken to be 0..TP/*NOSTRICT*/shuts off strict type checking in the next expression..TP/*ARGSUSED*/turns on the.B \-voption for the next function..TP/*LINTLIBRARY*/at the beginning of a file shuts off complaints aboutunused functions in this file..SH FILES/usr/lib/lint[12] programs.br/usr/lib/llib-lc declarations for standard functions.br/usr/lib/llib-port declarations for portable functions.SH SEE ALSOcc(1).brS. C. Johnson,.I Lint, a C Program Checker

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -