Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
tests/lint: clean up The .exp files are no longer kept under version control, so there's no reason anymore to forcefully trigger a warning or an error.
lint: remove explicit list of known GCC attributes Most GCC attributes consist of a single identifier. Up to now, it was necessary to list each of these identifiers in the grammar, even those that only apply to a single target architecture. Instead, parse the general form of attributes, matching the few attributes that lint handles by name instead. While here, rename the grammar rules to use the GCC terms. To avoid conflicts between the global function 'printf' and the GCC attribute of the same name, do not add GCC attributes to the symbol table, and don't make these symbols 'extern' either. ok christos@.
lint: reorder grammar rules First the base cases, then the extensions, like in most other rules in this file. No functional change.
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.