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:           Mon Jul 26 17:27:22 UTC 2021

Modified Files:
        src/tests/usr.bin/xlint/lint1: expr_precedence.c expr_precedence.exp
        src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: fix parsing of chained assignments (since 2021-07-15)

The grammar rule for assignment_expression is quite different from those
of the other expressions, for 2 reasons: first, its precedence is
right-to-left.  Second, its left-hand side must be an lvalue, which
rules out all binary operators.  K&R C even had a grammar rule named
'lvalue' for this purpose.  Later C standards made the kinds of
expressions more fine-grained and used 'unary_expression' in this place.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/expr_precedence.c \
    src/tests/usr.bin/xlint/lint1/expr_precedence.exp
cvs rdiff -u -r1.347 -r1.348 src/usr.bin/xlint/lint1/cgram.y

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