|
|
|
What's New in PC-lint/FlexeLint Version 8.00?
New Messages | Designer's Notes |
Press Release
| How to order an update
Inter-function Value
Tracking -- The powerful inter-statement value tracking
introduced in earlier versions of PC-lint/FlexeLint has been extended to
cross function boundaries. Functions
called with specific values are later processed, with these values used to
initialize parameters. To take full
advantage of inter-function tracking, a multi-pass operation has been
introduced. The user can control the number of passes. (See Designer's
Notes)
Machine readable documentation -- Message descriptions
will always be just a mouse click away.
New warnings and gotchas
- pointers to insufficiently large areas
- the dreaded malloc( strlen (s+1) )
- the foolish new int(10)
- when 64 bit pointers meet with 32 bit integer arithmetic
- when pointer parameters can be made pointers to const and when reference parameters can be declared as const
- when a member function can be made const
- shallow copies of member pointers within copy constructors and assignment operators
- when a test of assignment is not surrounded by parentheses.
- confusing unparenthesized operator sequences such as A/B*C
- returning a temporary via a reference
- a reference initialization that can cause a dangerous capability gain
- exception irregularities
- cases where the dynamic_cast should be used and where it is not appropriate
- when string literals are placed in harm's way via assignment to char *
- when white space may intervene between a backslash and a newline creating an invisible ambiguity
- strange comparisons that can't possibly succeed
New Elective Notes
- use of 0 when NULL is intended
- situations where const can be added to parameters, and variables,
and pointers
- non const non volatile global variables, locating these can assist multi-threaded
applications in detecting non re-entrant situations
- much more thorough exception analysis (for C++ users)
- prototypes missing parameter names
- suspicious conditions when you suspect you have order-of-initialization
problems
- pointer subtractions which can be a problem in conditions of maximum
memory
- conditions which can give rise to alignment problems
New and revised options of interest
- -sem enhancements include the ability to specify that return pointers from
functions are freshly allocated and that pointer arguments to functions are
consumed (i.e. the function takes custody of the pointer)
- user-defined printf and scanf codes
- a 'poor-man's' class hierarchy for C code
- better support for defining non-standard preprocessing commands
- better support for defining and manipulating reserved words
Other options and features
- To better support intelligent editors and IDE's we produce special
additional messages when a given message contains interior location
information.
- We now offer a complete no-holds-barred C++ exception analysis.
- We now require a specific form of lint comment when program flow falls
through from one (nontrivial) case to the next.(option -fallthrough)
- The _lint predefined identifier now contains version information. For
Version 8.00 it has a value of 800.
- We have added explicit support for a subset of the MISRA (Motor Industry
Software Reliability Association) standard.
- Alignment is checked and can be set via a -a option similar to the
-s
options to set sizes.
- According to the Standard, new (and new[]) do not return NULL when out of
storage but rather throw an exception (bad_alloc).
- Support for Microsoft C/C++ and compatible systems include: .dsp
processing, #import, and pragmas once and message
- Support for Gnu C/C++ consists of a -cgnu option, variable macro arguments
and a form of 'testable' assignment that non-Gnu users can use.
- Support for Borland's C++ Builder including truncated file names
- Continued improvement in support for embedded systems compilers
New Error Inhibition Options
-e{ #
[,#]... } inhibits messages(s) # for the next
statement or declaration
--e{ #
[,#]... } inhibits messages(s) # within a braced
region
-etemplate( #
[,#] ... ) inhibits
+etemplate( # [,#] ...
) re-enables message(s) # while expanding templates
New Verbosity Options
-v...c Issues a verbosity message whenever a unique function
call is recorded
-v...d Indicates whether modules are processed as C or C++
-v...h- If the 'h' is followed immediately by a
'-' then the hierarchy will be
compressed producing the same tree in half the lines
-v...t Indicates when a template is being instantiated
-v...w Indicates when a function is being walked with specific arguments
New Flag Options
fdl has been enhanced to allow for pointer difference to be long long
flm Lock Message format
fnn new can return Null
frl Reference Location information
fsp SPecific function call processing
fss Sub-struct allows C struct's to be related as in inheritance
ftg turns off TRiGraph processing
ftr TRuncate flag to support Borland include's
New Message Presentation Options
-append(#,string ) can be used to append a trailing message
(string)
onto
an existing error message for error #
Additional Other Options
-
-background PC-lint/FlexeLint will run at a reduced priority under Windows NT.
-
-fallthrough The flow of control is falling through from one case
switch to another.
-
-headerwarn( filename [,filename]... ) Can be used to alert the user that
the specified header file is being used.
-
-ident1(string) This option allows the user to define a
one-character identifier.
-
+libdir Enhanced to support wild cards
-
+libh Enhanced to support wild cards
-
+linebuf This option doubles the size of the line buffer, which is initially 600 bytes.
-
-passes( k [,Options1 [,Options2] ] ) Allows multiple passes over the set of modules provided as input.
-
-ppw_asgn( word1, word2
) Assigns the preprocessor semantics associated
with word2 to word1 and activates word1.
-
--ppw( word1 [, word2] ... ) Removes preconceived notions as to what the
preprocessor word(s) mean.
-
+pragma( identifier, once ) This option allows the programmer to establish
identifier as a pragma code to indicate that the header is to be included just
once.
-
+pragma( identifier, message ) This option allows the programmer to
establish an arbitrary identifier as a pragma that will produce a message to standard out.
-
-pragma( identifier ) This option will remove the pragma whose name is
identifier.
-
-printf_code( Code [, Type] ) This option allows user-defined
printf codes.
-
--rw( word1 [, word2] ... ) Removes preconceived notions as to what the
potential reserved word(s) mean and gives it a default meaning (to ignore it).
-
-rw_asgn( word1, word2 ) This option assigns
the reserved word semantics of word2 to word1.
-
-scanf_code( Code [, Type] ) This option allows user-defined
scanf codes.
-
-sem This option has been enhanced to support a number of
new semantics.
-
--u This option is like -u except that any module at a lower
.lnt level is ignored.
Compiler Adaptation
Pre-Processor Directives
New Messages
37 Value of enumerator 'Symbol' inconsistent (conflicts with Location)
90 Option 'String' is only appropriate within a lint comment
91 Line exceeds Integer characters (use +linebuf)
92 Negative array dimension or bit field length (Integer)
93 New-line is not permitted within string arguments to macros
145 Type expected before operator, void assumed
147 sizeof takes just one argument
154 Could not evaluate type 'String', int assumed
155 Ignoring {...} sequence within an expression, 0 assumed
430 Character '@', taken to specify variable location, is not standard
C/C++
432 Suspicious argument to malloc
433 Allocated area not large enough for pointer
434 White space ignored between back-slash and new-line
435 integral constant 'String' has precision Integer, use +fll to
enable long long
436 Preprocessor directive in invocation of macro 'Symbol' at
Location
437 Passing struct 'Symbol' to ellipsis
675 No prior semantics associated with 'Name' in option 'String'
678 Member 'Symbol' field length (Integer) too small for enum
precision (Integer)
679 Suspicious Truncation in arithmetic expression combining with
pointer
680 Suspicious Truncation in arithmetic expression converted to pointer
681 Loop is not entered
682 sizeof applied to a parameter 'Symbol' whose type is a sized array
683 function 'Symbol' #define'd, semantics may be lost
684 Passing address of auto variable 'Symbol' into caller space
685 Relational operator 'String' always evaluates to 'String'
801 Use of goto is deprecated
818 'Symbol' (Location) could be declared ptr to const
820 Boolean test of a parenthesized assignment
821 Right hand side of assignment not parenthesized
825 control flows into case/default without -fallthrough comment
826 Suspicious pointer-to-pointer conversion (area too small)
827 Loop not reachable
828 Semantics of function 'Symbol' copied to function 'Symbol'
830 Location cited in prior message
831 Reference cited in prior message
832 Parameter 'Symbol' not explicitly declared, int assumed
833 Symbol 'Symbol' is typed differently (String) in another
module, compare with Location
834 Operator 'Name' followed by operator 'Name' is confusing.
Use parentheses
909 Implicit conversion from Type to bool
910 Implicit conversion (Context) from 0 to pointer
947 Subtract operator applied to pointers
951 Pointer to incomplete type 'Symbol' employed in operation
952 Parameter 'Symbol' (Location) could be declared const
953 Variable 'Symbol' (Location) could be declared as const
954 'Symbol' (Location) could be declared as pointing to a const
955 Parameter name missing from prototype for function 'Symbol'
956 volatile static or external variable 'Symbol'
957 Function 'Symbol' defined without a prototype in scope
958 Padding of Integer byte(s) is required to align member on
Integer byte boundary
959 struct size (Integer bytes) is not an even multiple of the maximum
member alignment (Integer bytes)
960 Violates MISRA Required Rule Name, String
961 Violates MISRA Advisory Rule Name, String
970 Use of modifier or type 'Name' outside of a typedef
971 Use of 'char' without 'signed' or 'unsigned'
1077 Could not evaluate default template parameter 'String'
1078 Class 'Symbol' should not have itself as a base class
1079 Could not find '>' or ',' to terminate template parameter at
Location
1080 Definition for class 'Name' is not in scope
1412 Reference member 'Symbol' is not initialized
1413 function 'Symbol' is returning a temporary via a reference
1553 struct 'Symbol' declared as extern "C" contains C++
substructure 'Symbol' (Location)
1554 Direct pointer copy of member 'Symbol' within copy constructor:
'Symbol'
1555 Direct pointer copy of member 'Symbol' within copy assignment
operator: 'Symbol'
1556 'new Type(integer)' is suspicious
1557 const member 'Symbol' is not initialized
1559 Uncaught exception 'Name' may be thrown in destructor 'Symbol'
1560 Uncaught exception 'Name' not on throw-list for function 'Symbol'
1561 Reference initialization causes loss of const/volatile integrity
(Context)
1760 Redundant template 'Symbol' defined identically at Location
1762 Member function 'Symbol' could be made const
1763 Member function 'Symbol' marked as const indirectly modifies class
1764 Reference parameter could be declared const reference
1768 Virtual function 'Symbol' has an access (String) different from the
access (String) in the base class (String)
1769 Member or base class 'Symbol' has no constructor
1770 function 'Symbol' defined without function String
1771 function 'Symbol' replaces global function
1772 Assignment operator 'Symbol' is not returning *this
1773 Attempt to cast away const (or volatile)
1774 Could use dynamic_cast to downcast ptr to polymorphic type 'Symbol'
1775 catch block does not catch any declared exception
1776 Converting string literals to char * is deprecated (Context)
1935 Dynamic initialization for class object 'Symbol1' (references
'Symbol2')
1936 Dynamic initialization for variable 'Symbol1' (references
'Symbol2')
1937 Static variable 'Symbol' has a destructor
1938 constructor 'Symbol' accesses global data
1939 Down cast detected
1961 virtual member function 'Symbol' could be made const
1962 Non-const member function 'Symbol' contains a deep modification
|
|
|
Home | Contact
| Order
PC-lint and FlexeLint are trademarks of Gimpel Software
Copyright © 2008, Gimpel Software, All rights reserved.
|
|