The following example causes two assertions to fail:
------------------------------------------
typedef unsigned US;
void f( US abc )
{
typedef US abc;
}
------------------------------------------
The resulting splint output is
splint redef.c
Splint 3.1.1.2 --- 27 May 2007
usymtab.c:1562: at source point
redef.c:5:18: *** Internal Bug at usymtab.c:1562: llassert failed: uid >= 0 && uid < typeId_fromInt (globtab->nentries) [errno: 0]
*** Please report bug to splint-bug@splint.org ***
(attempting to continue, results may be incorrect)
sRef.c:3237: at source point
redef.c:5:18: *** Internal Bug at sRef.c:3237: llassert failed: usymId_isValid (index) [errno: 0]
*** Please report bug to splint-bug@splint.org ***
(attempting to continue, results may be incorrect)
redef.c: (in function f)
redef.c:3:12: Parameter abc not used
A function parameter is not used in the body of the function. If the argument is needed for type compatibility or future plans, use /*@unused@*/ in the argument declaration. (Use -paramuse to inhibit warning)
Finished checking --- 1 code warning
2 internal bugs reported
gcc output is
$ gcc -c redef.c
redef.c: In function `f':
redef.c:5: error: 'abc' redeclared as different kind of symbol
redef.c:3: error: previous definition of 'abc' was here