Source-Changes archive

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

CVS commit: src/usr.bin/xlint/lint1



Module Name:    src
Committed By:   rillig
Date:           Thu Jan 11 23:06:19 UTC 2024

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y externs1.h tree.c

Log Message:
lint: correctly set system-header flag on cast-expression

When a cast-expression comes partly from a system header, determine at
the ')' whether the whole cast-expression comes from the system header.
Previously, it was based on the operand, which contradicted the
documentation of tn_sys.

Mainly affects strict bool mode (where expressions from system headers
are handled more leniently), as well as query 9 for parenthesized return
expressions.

Discovered upon manual inspection, as calling expr_alloc_tnode should
never be necessary when creating an expression node with operands;
there's build_op for that purpose.


To generate a diff of this commit:
cvs rdiff -u -r1.478 -r1.479 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.210 -r1.211 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.593 -r1.594 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