--------------------------------------------------
--- 19. MESSAGES ---
--------------------------------------------------
Most error messages have an associated error number. By looking up the
number in the list below you can obtain additional information about the
cause of the error.
After dividing the number by 1000 there is a quotient and a remainder.
The quotient is in the range of 0-9. The remainder lies in the range
0-999. Remainders in the range 1-199 are syntax errors, 200-299 are
PC-lint/FlexeLint internal errors and should never occur, 300-399 are
fatal errors usually brought about by exceeding some limit, 400-699 are
warning messages that indicate that something is likely to be wrong with
the program being examined. Remainders in the range 700-899 designate
informational messages. These may be errors but they also may represent
legitimate programming practices depending upon personal programming
style. Remainders in the range 900-999 are called "Elective Notes".
They are not automatically output. You may examine the list to see if
you wish to be alerted to any of them. Lint also provides an additional
set of elective notes in the 9000 range to help support various coding
guidelines. Like the traditional Elective Notes, these messages are not
automatically outputted.
C C++ Warning Level
Syntax Errors 1 - 199 1001 - 1199 1
Internal Errors 200 - 299 1200 - 1299 0
Fatal Errors 300 - 399 0
Warnings 400 - 699 1400 - 1699 2
Informational 700 - 899 1700 - 1899 3
Elective Notes 900 - 999 1900 - 1999 4
Elective Notes 9000 - 9199 Same 4
Glossary
A few of the terms used in the commentary below are:
argument The actual argument of a function as opposed to a dummy (or
formal) parameter of a function (see parameter).
arithmetic Any of the integral types (see below) plus float, double, and
long double.
Boolean In general, the word Boolean refers to quantities that can be
either true or false. An expression is said to be Boolean
(perhaps it would be better to say 'definitely Boolean') if it
is of the form: operand op operand where op is a relational (>
>= < <=), an equality operator (== !=), logical And (&&) or
logical Or (||). A context is said to require a Boolean if it
is used in an if or while clause or if it is the 2nd
expression of a for clause or if it is an argument to one of
the operators: && or ||. An expression needn't be definitely
Boolean to be acceptable in a context that requires a Boolean.
Any integer or pointer is acceptable.
declaration Gives properties about an object or function (as opposed to
a definition).
definition That which allocates space for an object or function (as
opposed to a declaration) and which may also indicate
properties about the object. There should be only one
definition for an object but there may be many declarations.
integral A type that has properties similar to integers. These include
char, short, int, and long and the unsigned variations of any
of these.
scalar Any of the arithmetic types plus pointers.
lvalue Is an expression that can be used on the Left hand side of an
assignment operator (=). Some contexts require lvalues such
as autoincrement (++) and autodecrement (--).
macro An abbreviation defined by a #define statement. It may or may
not have arguments.
member Elements of a struct and of a union are called members.
module That which is compiled by a compiler in a single independent
compilation. It typically includes all the text of a .c (or a
.cpp or .cxx, etc.) file plus any text within any #include
file(s).
parameter A formal parameter of a function as opposed to an actual
argument (see argument).
Message Parameters
Some of the messages are parameterized with one or more of the following
italicized names:
Char Some character
Context Specifies one of several contexts in which an assignment can
be made. Can be one of:
o assignment -- refers to an explicit assignment operator.
o return -- refers to the implied assignment of a return
statement. The type of the expression is converted implicitly
to the type of the function.
o initialization -- refers to the assignment implied by an
initialization statement.
o arg. no.... -- refers to the implied assignment of an argument
in the presence of a prototype. The type of the expression is
implicitly converted to the type within a prototype.
o arg. 'this' -- refers to the implied argument of a member
function call.
FileName A filename. Messages containing this parameter can be
suppressed with the -efile( ... ) option.
Integer Some integer
Invocation A function call with argument types. To suppress a message
containing an Invocation you need the complete call, not just
the function name. For example, the call f(1) could result
in Error 1024 parameterized by 'f(int)'. To suppress this
message you could use -esym(1024,f(int)). You could also use
wild cards as in -esym(1024,f*).
Kind A list of control structures.
Location A line number followed optionally by a filename (if different
from the current) and/or a module name if different from the
current.
Name A string, usually an identifier, that can be suppressed with a
-esym but not with -elibsym.
String A sequence of characters identified further in the message
description.
Symbol The name of a user identifier referring to a C or C++ object
such as variable, function, structure, etc. Messages
containing this parameter can be suppressed with the -esym(
... ) option. For C++, if Symbol is the name of a function
the full function signature (including parameters) is given.
Error suppression with -esym does not require (nor want) the
parameters.
Type A type or a top type base is provided. A top type base is one
of pointer, function, array, struct, union, or enum.
TypeDiff Specifies the way in which one type differs from another.
Because of type qualification, function prototypes, and type
compounding, it may not be obvious how two types differ.
Also, see the -etd option to inhibit errors based on type
differences. TypeDiff can be one or more of:
o basic -- The two types differ in some fundamental way such as
double versus int.
o count -- Two function types differ in the number of arguments.
o ellipsis -- Two function types differ in that one is
prototyped using an ellipsis and the other is not prototyped.
See <Section,15.8,Plain Vanilla Functions>.
o incomplete -- At least one of the types is only partially
specified such as an array without a dimension or a function
without a prototype.
o nominal -- The types are nominally different but are otherwise
the same. For example, int versus long where these are the
same size or double versus long double where these are the
same size. The two types are either both in
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PC-Lint 9.0L最新版,附带MISRA C++ 2008 pdf完整版 (631个子文件)
lpatch.bat 203B
macros-msc.c 10KB
macros-msc.c 10KB
macros-msc.c 10KB
lint2msg.c 10KB
sl-desm.c 5KB
sl-lc2.c 4KB
sl-c86.c 4KB
sl.c 4KB
sl-qc88.c 4KB
sl-mwc.c 4KB
where_is_stdio_h.c 1KB
module2.c 78B
macros-msc.cpp 10KB
macros-msc.cpp 10KB
macros-msc.cpp 10KB
module3.cpp 130B
module1.cpp 126B
filea.cpp 90B
module4.cpp 71B
fileb.cpp 38B
pclint9setup.exe 3.9MB
lint.exe 869KB
lint-nt.exe 716KB
lint-os2.exe 650KB
install.exe 99KB
tellme.exe 83KB
cfig386.exe 48KB
LPATCH.EXE 48KB
choose.exe 48KB
pr.exe 44KB
choose16.exe 32KB
lint2msg.exe 10KB
co-gcc.h 5KB
co-gcc.h 5KB
co-gcc.h 5KB
co-msc110.h 2KB
co-msc110.h 2KB
co-msc110.h 2KB
co-msc100.h 2KB
co-msc100.h 2KB
co-msc100.h 2KB
co-bc5.h 1KB
co-bc5.h 1KB
co-bc5.h 1KB
co-mc.h 1KB
co-mc.h 1KB
co-mc.h 1KB
co-msc80.h 998B
co-msc90.h 998B
co-msc80.h 998B
co-msc90.h 998B
co-msc80.h 998B
co-msc90.h 998B
lib-bcl.h 971B
lib-bcl.h 971B
lib-bcl.h 971B
co-cosm.h 709B
co-cosm.h 709B
co-cosm.h 709B
co-vage.h 706B
co-vage.h 706B
co-vage.h 706B
lib-rw.h 651B
lib-rw.h 651B
lib-rw.h 651B
co-byte.h 531B
co-byte.h 531B
co-byte.h 531B
test.h 468B
lib-in.h 456B
lib-in.h 456B
lib-in.h 456B
cooperative-limiting-of-concurrent.html 65KB
autorun.inf 32B
CUSTDATA.INI 29B
env-html.js 484B
env-html.js 484B
env-html.js 484B
au-misra3.lnt 78KB
au-misra3.lnt 78KB
au-misra3.lnt 78KB
au-misra2.lnt 60KB
au-misra2.lnt 60KB
au-misra2.lnt 60KB
au-misra-cpp.lnt 54KB
au-misra-cpp.lnt 54KB
au-misra-cpp.lnt 54KB
au-misra-cpp-alt.lnt 51KB
au-misra-cpp-alt.lnt 51KB
au-misra-cpp-alt.lnt 51KB
au-misra1.lnt 34KB
au-misra1.lnt 34KB
au-misra1.lnt 34KB
co-kc166xc.lnt 33KB
co-kc166xc.lnt 33KB
co-kc166xc.lnt 33KB
co-msc100.lnt 18KB
co-msc100.lnt 18KB
co-msc100.lnt 18KB
共 631 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
psyrocloud
- 粉丝: 3
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页