LCLint Release 2.5m

25 May 2000

Release 2.5m is a minor upgrade to the last public release, Version 2.4b. It is believed to fix all reported and reproducible bugs in Version 2.4b.



-larchpath path and -lclimportdir dir flags
The LARCH_PATH and LCLIMPORTDIR environment variables can now be overridden using the command line flags -larchpath and -lclimportdir.
Syslog format string
Added special handling for "%m" in syslog format string (it does not consume an argument) (tests2.4/syslog.c)
Hints for type errors
Better hints for type errors (in presence of pointers) added +charunsignedchar flag
Added support for gcc extentsion __alignof__ (tests2.4/alignof.c)
long long
Support LL and ULL constant designators and long long and unsigned long long types (in C99) (suggested by Martin Smoot)
Win32 command line wildcards
Support wildcards in Win32 command lines (by linking with setargv.obj).

Bug Fixes

Case Markers
Fixed case/default parsing by making them markers instead of statements (switch (p) { case 2: } produced a parse error). (See tests2.4/emptycase.c.)

Switch Body Structure Fixed symbol table structure to support unstructured cases:

    switch(a) {
    case 1:   
      while (c>3) {
	case 3: ++c;
In the hope that this won't encourage more code like this! (See tests2.4/duffs.c, bug1.c, bug2.c, bug3.c.)
Label Parsing
Fixed label parsing to handle labels not followed by statements (Reported by N. Komazaki) (See tests2.4/komazi.c.)
Pre-processor Definitions with Parameters
Fixed pre-processor bug handling command line definitions with parameters (e.g., lclint '-D__P(x)=x') (tests2.4/cpptest.c)
Pre-processor Handling
Fixed handling of spaces in command line definitions (-D X=3) (reported by Daniel Barker) (tests2.4/command line)

Incorporated pre-processor fix sent in by N. Komazaki

Fixed handling of "#" (empty) in cpp (reported by Ulrich Ottersbach) (tests2.4/ulrich.c)

Added warning for comment open ("/*") inside comment (tests2.4/innercomment.c)

LCL pathnames
Fixed handling of direct pathnames in lcl files (reported by Dana Harrington) (tests2.4/subdir/main.lcl)
Function Pointer Declarations
Fixed handling of function pointer declarations like, void (**(sig_func))(void);. (reported by Buck Hodges) (tests2.4/enumtest.c)
Nested static declarations
Fixed handling of static function declarations inside method scopes (tests2.4/nothing.c)
printf %n format
Fixed handling of %n printf format. It should be /*@out@*/ int * (tests2.4/print.c)
enum initializers
Added checking for enum members types (using initializers)
enum parsing
Fixed parsing of undefined system-like identifiers in enum member lists (reported by Steve Fink) (tests2.4/fink.c)
gcc __extension__ keyword
Fixed handling of gcc extension __extension__ (should not be treated as a token) (tests2.4/driverstub.c)
Hex Constants
Hexidecimal constants (e.g., 0xFF) are typed as unsigned, but decimal constants are signed.
Compound member designator in offsetof
Fixed parsing of offsetof expressions, like:
typedef struct { union { int i; } u; } S;
int main() { return (int)offsetof(S, u.i); }
Bitfield casts
An internal error is raised for casts in bitfield widths:
typedef unsigned S;
typedef struct {
  unsigned u : ((S)4);
} T;