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

📄 read80.txt

📁 PC-Lint是一种静态代码检测工具
💻 TXT
📖 第 1 页 / 共 2 页
字号:
       evaluation of expressions involving nul-terminated strings.
       These inferences were prone to error and were resulting in
       undeserved messages.

       Owing to steady progress in the accuracy of making such
       inferences the flag has been made default OFF.  To obtain the
       prior behavior (i.e.  as it was in version 8.00L) turn the flag
       on with +fii.

    o  Macro Concatenation Flag (+fmc)
       If the flag is ON, a token immediately following a macro with
       parentheses, will, in effect, be pasted on to the end of the last
       token of the macro replacement.  For example, the code
       
             #define A() a
             int A()x;
       
       will normally be greeted with an error according the ANSI/ISO
       standards because this is equivalent to:
       
             int a x;
       
       However if the Macro Concatenation flag is turned on (using the
       option +fmc) the two names are in effect pasted together to
       produce the equivalent of:
       
             int ax;
       
       Prior to the Ansi standard the only way to perform a
       concatenation of this kind was through the device described
       above.  Now the approved mechanism is through the ## operator.
       The option is a means of supporting older programs that are still
       employing the older technique.

    o  Treat carriage Return as Newline (+frn)
       If this flag is ON, carriage return characters (0x0D) in the
       source input not followed by a Newline (0x0a) are treated as
       Newline characters (i.e., as line breaks).  This is necessary to
       process Macintosh style source code on the PC or Unix or their
       derivatives.  With this flag ON all three conventions (NL alone,
       CR alone, and CR NL in combination) are taken to be a Newline so
       that you may mix header files.

    o  -A(C90)
       The -A option (strict ANSI) has been upgraded to conform to the
       C99 standard.  In particular it no longer complains about //
       comments in C code.  To obtain the older style you can use the
       option -A(C90) which says that if the module is a C module it
       should conform strictly to the version of C identified as C90.

    o  multi-thread support
       A number of customers have asked for some kind of multi-thread
       support.  In particular they have asked us for a way to designate
       some data as 'Shared' so that only functions that are also marked
       'Shared' can access the data; also, Shared functions can only
       access Shared data and none other.  If it were not for the second
       criterion you could use the volatile qualifier.

       It so happens that there are a number of old modifier flags that
       can be used for this purpose.  One such is the keyword 'fortran'.
       This keyword is normally not active.  When it was active
       compilers would use the modifier as a clue to employ a
       fortran-like calling sequence for any function so designated.
       Lint would simply ignore these intended semantics and restrict
       its usage to ensuring that declarations would be consistent with
       respect to this modifier.  For example, you wouldn't want to pass
       a pointer that points to a Fortran function to a pointer that
       points to a non-fortran function.  These simple
       type-qualification semantics can be used as the basis for a new
       keyword, in this case 'Shared'.

       For example:
       
             //lint -rw_asgn(Shared,fortran)
             struct X { void f() Shared; void g(); ... };
             X Shared a;
             X b;
             ...
             a.f();   // OK
             a.g();   // Error
             b.f();   // Error
             b.g();   // OK
       

       Using functions rather than member functions we can obtain the
       same effect.
       
             //lint -rw_asgn(Shared,fortran)
             struct X { ... };
             void f( struct X Shared * );
             void g( struct X * );
             struct X Shared a;
             struct X b;
             ...
             f( &a );   // OK
             g( &a );   // Error
             f( &b );   // Error
             g( &b );   // OK
       

       In addition to 'fortran' there are a number of other old
       modifiers that could be employed including: 'pascal',
       '_fastcall', and '_loadds'.

       Any such modifier that is used in the formation of a type will be
       embedded within that type when the type is displayed for
       diagnostic purposes.  The name that is used by default will be
       the original qualification name.  This name will be overridden
       when the -rw_asgn option assigns a modifier to some new name.



                ------ New or Improved Error Messages ------


    89   Argument or option too long ('String') -- The length of an
         option (shown in String) exceeds an internal limit.  Please try
         to decompose the option into something smaller.  At this
         writing the limit is 610 characters.

    155  Ignoring { }'ed sequence within an expression, 0 assumed --
         Some compilers support what looks like a compound statement as
         a C/C++ expression.  For example to define the absolute value
         of an integer which guarantees that it will be read only once
         you may use:
         
               #define abs(a) { int b = a; b >= 0 ? b : -b; }
         
         The last expression in the list is the result.  To
         syntactically support the construct without running amuck we
         recognize the sequence and issue this message.  If you want to
         use the facility just suppress the message.

    326  String 'String ...' too long, exceeds Integer characters -- A
         string (first 40 characters provided in the message) exceeds
         some internal limit (provided in the message).  There is no
         antidote to this condition in the form of an option.  FlexeLint
         customers may recompile with a redefinition of either M_STRING
         (maximum string) or M_NAME (maximum name).  To override the
         definition in custom.h we suggest recompiling with an
         appropriate -dvar=value option assuming your compiler supports
         the option.

    584  Trigraph sequence (??Character) detected -- This message is
         issued whenever a trigraph sequence is detected and the
         trigraph processing has been turned off (with a -ftg).  If this
         is not within a string (or character) constant then the
         trigraph sequence is ignored.  This is useful if your compiler
         does not process trigraph sequences and you want linting to
         mirror compilation.  Outside of a string we issue the Warning
         but we do translate the sequence since it cannot make syntactic
         sense in its raw state.

    660  Option 'String' requests removing an extent that is not on the
         list -- A number of options use the '-' prefix to remove and
         '+' to add elements to a list.  For example to add (the most
         unusual) extension .C++ to designate C++ processing of files
         bearing that extension, a programmer should employ the option:
         
               +cpp(.C++)
         
         However, if a leading '-' is employed (a natural mistake) this
         warning will be emitted.

    686  Option 'String' is suspicious because of 'Name' -- An option is
         considered suspicious for one of a variety of reasons.  The
         reason is designated by a reason code that is specified by
         Name.  At this writing, the only reason code is 'unbalanced
         quotes'.

    814  useless declaration -- A tagless struct was declared without a
         declarator.  For example:
         
               struct { int n; };
         
         Such a declaration cannot very well be used.

    1076 Anonymous union assumed to be 'static' -- Anonymous unions need
         to be declared static.  This is because the names contained
         within are considered local to the module in which they are
         declared.

    1083 Ambiguous conversion between 2nd and 3rd operands of
         conditional operator -- If the 2nd operand can be converted to
         match the type of the 3rd, and the 3rd operand can be converted
         to match the type of the 2nd, then the conditional expression
         is considered ill-formed.

    1549 Exception thrown for function 'Symbol' not declared to throw --
         An exception was thrown (i.e., a throw was detected) within a
         function and not within a try block;  moreover the function was
         declared to throw but the exception thrown was not on the list.
         If you provide an exception specification, include all the
         exception types you potentially will throw.  [23, Item 14]

    1550 exception 'Name' thrown by function 'Symbol' is not on
         throw-list of function 'Symbol' -- A function was called (first
         Symbol) which was declared as potentially throwing an
         exception.  The call was not made from within a try block and
         the function making the call had an exception specification.
         Either add the exception to the list, or place the call inside
         a try block and catch the throw. [23, Item 14].

    1560 Uncaught exception 'Name' not on throw-list of function
         'Symbol' -- A direct or indirect throw of the named exception
         occurred within a try block and was either not caught by any
         handler or was rethrown by the handler.  Moreover, the function
         has an exception specification and the uncaught exception is
         not on the list.  Note that a function that fails to declare a
         list of thrown exceptions is assumed to potentially throw any
         exception.




                        Gimpel Software
                        January, 2004

⌨️ 快捷键说明

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