LCLint Home Page

LCLint Home


Windows 95/NT


User's Guide
       HTML Online

Other Sources

Mailing Lists



This page documents reported bugs in LCLint 2.4.

Please check this page and make sure you are using the latest release (2.4b) before submitting a bug report. If you discover a bug that is not documented here, please report it to Include enough information and relevant files so that the bug may be reproduced.


These bugs have been reproduced, and are known to be problems.

Hex Constants

Hexidecimal constants (e.g., 0xFF) are typed as unsigned, but decimal constants are signed.
Compound member designator in offsetof
LCLint cannot parse complex offsetof expressions, like:
typedef struct { union { int i; } u; } S;
int main() { return (int)offsetof(S, u.i); }
Internal Bug at exprNode.c:816
An internal error is raised for casts in bitfield widths:
typedef unsigned S;
typedef struct {
  unsigned u : ((S)4);
} T;
Internal Bug at cscanner.l:1884
An assertion will fail in certain situations when a syntactic comment is not closed.
Segmentation Violation checking special clauses (?)
The Win32 version produces a segmentation violation for a small test program involving special clauses. (Reproduced, but not investigated further.)


These bugs have been reported, but have not been reproduced or investigated yet.

Problem with libraries

A user-created library produces:
load file ../lib/pthread.lcd: Library file appears to be corrupted. 
    general.c:342:No int to read:
(Not reproduced yet.)

Fixed in Version 2.4b

These bugs were fixed in update 2.4b.

Checked macros in #ifdefs, etc.

LCLint will incorrectly interpret #ifdefs and other preprocessor commands that involve checked macros. Since the macro is not expanded by the preprocessor, it does not appear to be defined in the #ifdef.
File format in preprocessor messages
The parentfileformat and showcolumn flags do not effect messages reported in the preprocessing phase.
observer arrays
LCLint does not allow observer to be used with an array:
/*@observer@*/ char name[] = "Joe-Max";
Version 2.4b interprets observer on an array in the same way as a pointer to observer storage --- a warning is reported if any element of the array is modified.
LCLint won't compile on some UNIX systems because it assumses sys_nerr is defined (note, LCLint checking would have detected this, if I didn't override it!). It should just use strerror from the standard library.

Fixed in Version 2.4a

These bugs were fixed in update 2.4a.


osd.c should include errno.h.
The source package did not include -DHAVE_STRERROR in the compile flags. On some systems, this leads to an error when llerror.c is compiled.
Address operator on fields
LCLint incorrectly marks storage resulting form &() as stack-allocated.
isalnum type
The ansi.h library incorrectly declared isalnum and related functions to take an unsigned int parameter (instead of an int). This results from a problem with alternate types and type modifiers, the declaration
unsigned char /*@alt int@*/
was interpreted as
unsigned int | char
Internal Bug at aliasChecks.c:413
LCLint reports internal errors for certain memory checks involving field assignments.

Typing of bitwise operators

LCLint thinks the type of int | unsigned int is int. It should be unsigned int.
Internal Bug at guardSet.c:50
A assertion fails for code like while (a[0] != 0) a[0+2]=0;.
ifndef not handled correctly
LCLint preprocesses #ifndef like #ifdef!
Internal Bug at clabstract.c:1111
An internal assertion fails when a function declaration has both special clauses and a globals clause.

David Evans
Software Devices and Systems