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:           Thu May 12 20:57:49 UTC 2022

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

Log Message:
lint: merge duplicate grammar rules for __alignof__ expr

This allows expressions like '__alignof__(ptr)->member', just as with
'sizeof'.

The upper rule in the grammar was preferred over the lower rule since it
shifted the T_LPAREN instead of reducing unary_expression.  Its
implementation invoked undefined behavior if the expression was NULL
since it didn't assign anything to $$.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_alignof.c
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_alignof.exp
cvs rdiff -u -r1.414 -r1.415 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