Home | History | Annotate | Download | only in lint2
History log of /src/usr.bin/xlint/lint2/emit2.c
RevisionDateAuthorComments
 1.42  24-May-2025  rillig lint: constify
 1.41  16-May-2025  rillig lint: clean up
 1.40  29-Aug-2024  rillig lint: support GCC's __auto_type

Fixes PR toolchain/58654.
 1.39  12-May-2024  rillig branches: 1.39.2;
lint: add wrapper for <ctype.h> functions, for strict bool mode

When using the Clang preprocessor (with MKLLVM=yes), the preprocessor
output does not indicate which tokens come from a system header and
which tokens come from the user code. Lint's strict bool mode relies on
this information to treat the character classification functions from
<ctype.h> as if their return type were bool instead of int.

These wrapper functions are only used when their argument is indeed a
'char', but not when the argument might be 'EOF or representable as an
unsigned char', such as when reading a byte from the input.
 1.38  02-Mar-2024  rillig lint: remove custom wrappers around <ctype.h> functions
 1.37  03-Dec-2023  rillig lint: in declarations, replace tab with space

Previously, in some cases, the keywords 'const' or 'struct' were
followed by a tab, which doesn't make sense.

No functional change.
 1.36  12-Aug-2023  rillig lint: clean up comments

There's no output buffer anymore.
 1.35  12-Aug-2023  rillig lint: remove redundant comments
 1.34  12-Aug-2023  rillig lint: for each record in the output file, write the newline immediately

There's no point delaying the '\n' until the next line is written.
 1.33  13-Jul-2023  rillig lint: indent copyright lines consistently
 1.32  29-Jun-2023  rillig lint: clean up initialization of type properties

No functional change.
 1.31  09-Jun-2023  rillig lint: indent local variables consistently

No binary change.
 1.30  02-Feb-2023  rillig lint: clean up

In symtab_search, most of the conditions were redundant, so remove them.

In read_byte, using CHAR_MASK was conceptually wrong, as that constant
is from the target platform while the lexical analysis happens on the
host platform. It was unnecessary as well, as a hypothetical host
platform with 36-bit chars might encode the characters from the basic
source character set as numbers higher than 0x0_0000_00ff. Since lint
assumes that both the source character set as well as the execution
character set are the same and based on 8-bit bytes, nothing changes.

No functional change.
 1.29  14-Jan-2023  rillig lint: clean up messages for internal errors
 1.28  20-May-2022  rillig lint: use __RCSID in lint mode as well

Since 1995-10-02, lint supports __asm statements and __asm modifiers.

No binary change.
 1.27  16-Nov-2021  rillig lint: clean up lint2

No functional change.
 1.26  04-Sep-2021  rillig lint: inline local variables in outtype

No functional change.
 1.25  04-Sep-2021  rillig lint: condense code for writing to a lint library

Same as in lint1.

No functional change.
 1.24  04-Sep-2021  rillig lint: use 'char' as type for passing characters to functions

No functional change.
 1.23  29-Aug-2021  rillig lint: un-abbreviate members of sym_t

No functional change.
 1.22  28-Aug-2021  rillig lint: write the entries for the libraries in alphabetical order

This makes them easier to read by humans.

The checks are still performed in hashcode order since there are no
tests that would cover this change.
 1.21  28-Aug-2021  rillig lint: remove unused parameter from forall

No functional change.
 1.20  24-Aug-2021  rillig lint: allow libraries to use 128-bit integer types
 1.19  02-Apr-2021  rillig lint: add parentheses after sizeof, as required by share/misc/style

No functional change.
 1.18  26-Mar-2021  rillig lint: in malloc calls, use 'sizeof *ptr' instead of 'sizeof(type)'

No functional change.
 1.17  22-Feb-2021  rillig lint: change spelling of initialisation to initialization

That's the wording from the ISO C99 standard.
 1.16  19-Feb-2021  rillig lint: rename t_isenum and t_aincompl to be more expressive

No functional change.
 1.15  30-Dec-2020  rillig lint: rename s_nxt to s_next
 1.14  29-Dec-2020  rillig lint: remove redundant parentheses around return value
 1.13  26-Sep-2008  matt Teach lint about long double _Complex (C99)
 1.12  26-Apr-2008  christos same change: double is emitted as '\0'
 1.11  25-Apr-2008  christos handle lintlibrary output of _Complex types.
 1.10  12-Sep-2004  yamt branches: 1.10.26;
recognize _Bool.
 1.9  31-Jan-2002  tv Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.8  21-Jan-2002  tv Add hooks for compiling on non-NetBSD hosts.
 1.7  26-Jul-2001  wiz Various typos in comments (neccessary, sceme, choise, ...).
 1.6  28-May-2001  lukem cleanup (prior to more adding more features):
- 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.
 1.5  14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.4  22-Feb-1998  christos branches: 1.4.8;
WARNSify
 1.3  22-Dec-1996  cgd * 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.
 1.2  03-Jul-1995  cgd RCS id cleanup
 1.1  03-Jul-1995  cgd branches: 1.1.1;
Initial revision
 1.1.1.1  03-Jul-1995  cgd lint(1) implementation, by Jochen Pohl. named 'xlint' for a similar
reason to why 'install' is named 'xinstall'.
 1.4.8.1  23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.26.1  18-May-2008  yamt sync with head.
 1.39.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed