models of type sizes that we currently support, and include
the appropriate one in each arch's targparam.h.
* Use the type size constants provided by targparam.h in the
type table, rather than using "sizeof(type) * CHAR_BIT" (which
would get the host's type size, not the target's). XXX Not
yet done for floating point types.
* Add a new BITFIELDTYPE lint comment that suppresses illegal
bitfield type errors if the type is an integer type (e.g.
long, long long), and also suppresses non-portable bitfield
type warnings.
overriding FD_SETSIZE. Not overriding it makes it stomp all over memory
(which caused the debug outputs we've seen lately).
It used to work, but toolification of lint broke it.
XXX Note that the overflow code for many cases seems to be buggy. I've
only fixed one bug that was bothering me. A set of regression tests
and extensive testing are needed.
* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.
* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.
* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.
* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).
* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.
* Add src/tools/groff and set up paths to work with this cross groff.
pull the correct one in based on the MACHINE_CPU variable.
MACHINE_CPU will be set according to the target system we are
building for by <bsd.own.mk>.
One component of addressing bin/14280.
- convert to ANSI KNF
- remove trailing whitespace
- translate some comments from german into english
code compiles and runs clean, and tested by running "make lint" against
xlint source using previous and this lint produces same results.
foo((sockaddr *(void *))0);
This fix is imperfect, because right now we just check the subtype
chains for NULL and we return to the caller when the loop ends, leaving
the upper layers to cope with the syntax error. Ideally we should:
a.) return an error to the upper layer, or
b.) not call the type analysis routines in the presence of a syntax
error.
That would require a significant re-write which would take much more time
than I have...
__attribute__ and __extension__ workarounds.
Our invariant is: No gcc extensions if __GNUC__ is not defined, so lint
should not be playing around trying to pretend it is gcc.
at the lexical analysis stage not at the syntax parsing stage. The upshot
is that:
if (expr) {
stmt1;
}
/* LINTED */
stmt2;
stmt2 is the look-ahead token for the parser to choose between and if-then-else
statement as opposed to an if-then statement. Unfortunately the side effect
is that the LINTED directive gets reset before stmt2 gets parsed. We fix this,
by remembering the the linted directive during the if statement parsing and
restoring it at the appropriate time.
place" (e.g., when DESTDIR is set). This causes the lint driver to
pass -nostdinc -idirafter <dir> to cpp, causing it to ignore
/usr/include and look somewhere else instead..
used as lint1 input. That involves having lint pass the '-' through
to the cpp which preprocesses the lint1 input, and having lint1's
scanner recognize a cpp filename "" as "{standard input}".
convert them to pointers. If they're zero, they're converted (to
NULL pointers) regardless of size. If they're non-zero, they can't
be converted (without a cast). This matches the behavior of other
version of lint, e.g. the lints on Digital UNIX and HP-UX.
* recognize that pointers to identical unnamed and untyped structs,
unions, and enums are, in fact, identical. This is done by tagging
each of unnamed and untyped structure, union and enum with a unique
position of creation, which is used as a unique identifier that
when determine whether or not a pair of structures, unions, or enums
are identical.
unions, and enums are, in fact, identical. This is done by tagging
each of unnamed and untyped structure, union and enum with a unique
position of creation, which is used as a unique identifier that
when determine whether or not a pair of structures, unions, or enums
are identical.
* accept the file name '-' to indicate that standard input is to be
used as lint1 input. That involves having lint pass the '-' through
to the cpp which preprocesses the lint1 input, and having lint1's
scanner recognize a cpp filename "" as "{standard input}".
unions, and enums are, in fact, identical. This is done by tagging
each of unnamed and untyped structure, union and enum with a unique
position of creation, which is used as a unique identifier that
when determine whether or not a pair of structures, unions, or enums
are identical.
variable declaration, in addition to within function & variable
declarations and function bodies. I think this comes close enough
to what gcc does to be considered "correct enough." Certainly, it
fixes the problem for the couple of cases where this is a problem
in our tree.
global or local declaration/definition/statement. Originally they were
valid on the current and next line, which made it hard to suppress
warnings in constructs with more then one line.
LONGLONG can now be used to suppress errors or warnings in the next
declaration, definition or statement.
asm statements consist of an asm keyword, an optional qualifier, a
left paren, a list of tokens up to and including the matching right
paren, and a semicolon.
asm modifiers consist of an asm keyword, an left paren, a string and a
right paren.
asm statements and modifiers have no semantic for lint(1), they exist only
to avoid complaints about them.