The NetBSD Project

CVS log for src/tests/usr.bin/xlint/lint1/gcc_attribute_label.c

[BACK] Up to [] / src / tests / usr.bin / xlint / lint1

Request diff between arbitrary revisions

Default branch: MAIN

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 28 21:38:38 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, HEAD
Changes since 1.2: +25 -1 lines
Diff to previous 1.2 (colored)

lint: revert resolving grammar conflicts for labeled statements

Restore the grammar rule for labeled_statement as it was before cgram.y
1.400 from 2022-04-24.  This allows labels with attributes again.  Fix
the wrong interpretation in the tests; the attributes belong to the
label, not to the statement.

Today in the morning, when I thought that the change in cgram.y 1.400
were innocent, I accidentally ran lint only with the options '-Sw' but
forgot the option '-g' for GNU mode.  Without that option, the token
'__attribute__' is unknown, which unsurprisingly leads to lots of syntax
errors, and these didn't change with that commit.  The actual change was
only visible in GNU mode.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jul 11 19:24:42 2021 UTC (18 months, 4 weeks ago) by rillig
Branch: MAIN
Changes since 1.1: +1 -7 lines
Diff to previous 1.1 (colored)

lint: support __attribute__((hot))

The corresponding attribute 'cold' was already added in cgram.y 1.84
from 2016-12-29.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 6 17:33:07 2021 UTC (19 months ago) by rillig
Branch: MAIN

tests/lint: add tests for GCC __attribute__

Before fixing the wrong handling of __attribute__ that is demonstrated
at the end of gcc_attribute.c, ensure that the attribute handling works
in the most basic cases.

Lint currently accepts __attribute__ in more places than it should.
This leads to some ambiguities in the grammar.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

CVSweb <>