History log of /netbsd-current/usr.bin/xlint/lint1/ckbool.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.32 12-May-2024 rillig

lint: condense code for strict bool mode


# 1.31 12-May-2024 rillig

lint: in strict bool mode, allow do-while-0

Even though 0 is not a boolean constant, allow this common idiom, to
help in those cases where the C preprocessor used by lint does not mark
tokens as coming from system headers (Clang).


# 1.30 09-Mar-2024 rillig

lint: inline accessor macros for tnode_t


# 1.29 03-Feb-2024 rillig

lint: clean up comments, reduce scope of variables


# 1.28 30-Dec-2023 rillig

lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type. This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.


# 1.27 03-Dec-2023 rillig

lint: indent statement continuations consistently

No binary change.


# 1.26 02-Aug-2023 rillig

lint: distinguish between arguments and parameters


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.30 09-Mar-2024 rillig

lint: inline accessor macros for tnode_t


# 1.29 03-Feb-2024 rillig

lint: clean up comments, reduce scope of variables


# 1.28 30-Dec-2023 rillig

lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type. This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.


# 1.27 03-Dec-2023 rillig

lint: indent statement continuations consistently

No binary change.


# 1.26 02-Aug-2023 rillig

lint: distinguish between arguments and parameters


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.29 03-Feb-2024 rillig

lint: clean up comments, reduce scope of variables


# 1.28 30-Dec-2023 rillig

lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type. This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.


# 1.27 03-Dec-2023 rillig

lint: indent statement continuations consistently

No binary change.


# 1.26 02-Aug-2023 rillig

lint: distinguish between arguments and parameters


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.28 30-Dec-2023 rillig

lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type. This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.


# 1.27 03-Dec-2023 rillig

lint: indent statement continuations consistently

No binary change.


# 1.26 02-Aug-2023 rillig

lint: distinguish between arguments and parameters


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.27 03-Dec-2023 rillig

lint: indent statement continuations consistently

No binary change.


# 1.26 02-Aug-2023 rillig

lint: distinguish between arguments and parameters


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-0-RC1 netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.26 02-Aug-2023 rillig

lint: distinguish between arguments and parameters


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.25 10-Jul-2023 rillig

lint: merge duplicate code for getting the name of an operator


# 1.24 09-Jul-2023 rillig

lint: remove redundant '#' after 'argument' in diagnostics


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.23 02-Jul-2023 rillig

lint: rename 'quad' to 'signed int' or 'unsigned int'

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.22 24-Jun-2023 rillig

lint: reduce memory allocations

The type val_t has the same size as the tn_s member in the same union.

No functional change.


# 1.21 22-May-2023 rillig

lint: rename constant NOTSPEC to NO_TSPEC

It was too easy to misread the old name as NOT_SPEC instead of the
intended NO_TSPEC.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.20 21-Jan-2023 rillig

lint: make code for strict bool mode more consistent

Guard all entry points with a check for Tflag and remove the now
redundant internal check for Tflag.

No functional change.


Revision tags: netbsd-10-base
# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.19 22-Jun-2022 rillig

lint: add quotes around placeholders for the remaining messages

Reword some of the messages slightly, exchanging brevity for clarity.

Message 138 is kept as-is, as it is not yet covered by any tests.

Message 240 is kep as-is, as it is unreachable.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.18 19-Jun-2022 rillig

lint: add quotes around placeholders in 4 messages


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.17 15-Jun-2022 rillig

lint: rename mod_t.m_requires_bool to m_compares_with_zero

The operators NOT, LOGAND, LOGOR and QUEST only require _Bool in strict
bool mode, in default mode they accept any scalar expression and compare
it with zero. The new names are more accurate.

No functional change.


# 1.16 15-Jun-2022 rillig

lint: clean up an empty line and the documentation

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.15 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.14 19-May-2022 rillig

lint: in strict bool mode, check function arguments more strictly

When a system header defined the constant FALSE = 0, that constant could
be passed as a bool argument. On the other hand, the constant TRUE = 1
could not be passed in the same way. Remove this inconsistency.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.13 16-Apr-2022 rillig

lint: merge mod_t.m_test_context into m_requires_bool

These two flags mean exactly the same.

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.12 09-Apr-2022 rillig

lint: disambiguate sym_t.s_value

Having a single variable for 4 different purposes with different types
makes the code unnecessarily hard to follow.

No functional change.


# 1.11 09-Apr-2022 rillig

lint: split CTCONST into BOOL_CONST and ENUM_CONST

Having a unified compile-time constant "storage class" made the code
more difficult to understand.

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.10 22-Dec-2021 rillig

lint: fix wrong error in strict bool mode in condition with comma

For the result of the comma operator, it doesn't matter whether the
comma itself comes from a system header or not. Instead, it's the main
operator of the right operand.

Since 2021-11-16.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.9 16-Nov-2021 rillig

lint: fix check for function calls in strict bool mode

Previously, if a function call occurred in the controlling expression,
its return type could be any scalar, not just bool. This was against
the goal of strict bool mode, which makes bool a separate and
incompabile type to all other types. For example, it would allow
controlling expressions like 'strcmp(a, b)' without the usual '!= 0',
but only if at least one of 'a' and 'b' came from a macro definition
from a system header.

The fix is that the decision of whether the type of the controlling
expression may be scalar is no longer based on the operand types but on
the main operator of the controlling expression.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.8 26-Jul-2021 rillig

lint: make typeok_scalar_strict_bool simpler

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.7 04-Jul-2021 rillig

lint: in strict bool mode, allow mixed types in generated C code

This allows flex lexers to be run through lint in strict bool mode.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.6 02-Jul-2021 rillig

lint: in strict bool mode, make (flag & FLAG) simpler

This is a tiny change in an edge case that does not occur in practice,
which is that the left-hand side of the '&' is explicitly cast to an
enum type. The apparent "loss of information" from the deleted comment
has already been explained in the previous commit.


# 1.5 02-Jul-2021 rillig

lint: no special check for unary operators in strict bool mode

All interesting constellations regarding unary operators are already
covered by the simple model from ops.def.

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.4 20-Jun-2021 rillig

lint: rename val_t.v_unsigned to avoid confusion

The name v_unsigned suggested that the value would be interpreted as
unsigned, which was wrong. Whether a value is signed or unsigned is
decided by v_tspec instead.

Revert the previous commit for boolen constants since their value is
already interpreted as unsigned, and there is no need for any warning
about differences between traditional C and ANSI C since the _Bool type
has only been added ten years later in C99.

The code for printing a tree node was also confused by this struct
member, even with its old name v_ansiu. That code will be fixed in a
follow-up commit.

No functional change.


# 1.3 20-Jun-2021 rillig

lint: in strict bool mode, treat boolean constants as unsigned

In strict bool mode, bool is not an arithmetic type anyway, therefore it
doesn't matter whether the type is signed or unsigned.

C99 6.2.5p6 defines _Bool as one of the "standard unsigned integer
types", so making the constants unsigned is more accurate.

No functional change.


# 1.2 20-Jun-2021 rillig

lint: rename val_t.v_ansiu to v_unsigned

When lint was written in 1995, traditional C was still nearby since C90
had been around for only 5 years. 26 years later, almost all code
adheres to C90 or even C99 or C11, therefore "C90 or later" can safely
be assumed as the default.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.


# 1.1 06-Apr-2021 rillig

lint: move check for strict bool mode into separate file

No functional change.