Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   rillig
Date:           Fri Jun 30 21:06:19 UTC 2023

Modified Files:
        src/tests/usr.bin/xlint/lint1: expr_sizeof.c init_braces.c msg_102.c
        src/usr.bin/xlint/lint1: cgram.y debug.c decl.c externs1.h init.c
            tree.c

Log Message:
lint: fix handling of unnamed struct/union members

The support for unnamed struct/union members that was added in decl.c
1.60 from 2015-10-13 was simple but wrong. It didn't cover initializers
of these structures and computed wrong sizes for structures containing
anonymous unions. At that time, the handling of initializers was broken
as well, it was fixed 6 years later in init.c 1.229 from 2021-12-22.

Real-life examples for code that lint couldn't handle are:

        * external/bsd/jemalloc/dist/src/jemalloc.c
        * external/mit/xorg/lib/dri.old/Makefile


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/usr.bin/xlint/lint1/expr_sizeof.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/init_braces.c
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/msg_102.c
cvs rdiff -u -r1.441 -r1.442 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/xlint/lint1/debug.c
cvs rdiff -u -r1.328 -r1.329 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.181 -r1.182 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.242 -r1.243 src/usr.bin/xlint/lint1/init.c
cvs rdiff -u -r1.536 -r1.537 src/usr.bin/xlint/lint1/tree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index