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:           Fri Apr 29 07:02:40 UTC 2022

Modified Files:
        src/usr.bin/xlint/lint1: cgram.y

Log Message:
lint: only allow GCC attribute in null statement

The only indented usage in that position is a fallthrough statement, as
a replacement for a /* FALLTHROUGH */ comment.  There is no point in
using _Noreturn or _Alignas as a statement.

Ideally, instead of gcc_attribute, the grammar would allow
gcc_attribute_list here (as always with GCC attributes), but that would
have introduced a reduce/reduce conflict, due to the attributes in the
middle of labeled_statement.

To generate a diff of this commit:
cvs rdiff -u -r1.404 -r1.405 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