Up to [cvs.NetBSD.org] / src / usr.bin / xlint / lint1
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.20 / (download) - annotate - [select for diffs], Sat Jan 21 20:07:01 2023 UTC (7 days, 9 hours ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.19: +4 -6
lines
Diff to previous 1.19 (colored)
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 1.19 / (download) - annotate - [select for diffs], Wed Jun 22 19:23:17 2022 UTC (7 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base,
netbsd-10
Changes since 1.18: +3 -3
lines
Diff to previous 1.18 (colored)
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.
Revision 1.18 / (download) - annotate - [select for diffs], Sun Jun 19 12:14:33 2022 UTC (7 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.17: +3 -3
lines
Diff to previous 1.17 (colored)
lint: add quotes around placeholders in 4 messages
Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 15 18:29:21 2022 UTC (7 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +7 -6
lines
Diff to previous 1.16 (colored)
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.
Revision 1.16 / (download) - annotate - [select for diffs], Wed Jun 15 18:11:02 2022 UTC (7 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +2 -3
lines
Diff to previous 1.15 (colored)
lint: clean up an empty line and the documentation No functional change.
Revision 1.15 / (download) - annotate - [select for diffs], Fri May 20 21:18:55 2022 UTC (8 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.14: +3 -3
lines
Diff to previous 1.14 (colored)
lint: use __RCSID in lint mode as well Since 1995-10-02, lint supports __asm statements and __asm modifiers. No binary change.
Revision 1.14 / (download) - annotate - [select for diffs], Thu May 19 17:24:14 2022 UTC (8 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.13: +5 -2
lines
Diff to previous 1.13 (colored)
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.
Revision 1.13 / (download) - annotate - [select for diffs], Sat Apr 16 22:21:10 2022 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.12: +3 -3
lines
Diff to previous 1.12 (colored)
lint: merge mod_t.m_test_context into m_requires_bool These two flags mean exactly the same. No functional change.
Revision 1.12 / (download) - annotate - [select for diffs], Sat Apr 9 15:43:41 2022 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.11: +4 -8
lines
Diff to previous 1.11 (colored)
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.
Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 9 14:50:18 2022 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.10: +4 -4
lines
Diff to previous 1.10 (colored)
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.
Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 22 15:36:37 2021 UTC (13 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.9: +5 -2
lines
Diff to previous 1.9 (colored)
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.
Revision 1.9 / (download) - annotate - [select for diffs], Tue Nov 16 21:01:05 2021 UTC (14 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.8: +6 -7
lines
Diff to previous 1.8 (colored)
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.
Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 26 16:22:24 2021 UTC (18 months ago) by rillig
Branch: MAIN
Changes since 1.7: +4 -4
lines
Diff to previous 1.7 (colored)
lint: make typeok_scalar_strict_bool simpler No functional change.
Revision 1.7 / (download) - annotate - [select for diffs], Sun Jul 4 09:13:59 2021 UTC (18 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.6: +5 -6
lines
Diff to previous 1.6 (colored)
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.
Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 2 21:22:26 2021 UTC (18 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.5: +4 -10
lines
Diff to previous 1.5 (colored)
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.
Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 2 18:52:20 2021 UTC (18 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +11 -14
lines
Diff to previous 1.4 (colored)
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.
Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 20 20:32:42 2021 UTC (19 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.3: +4 -4
lines
Diff to previous 1.3 (colored)
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.
Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 20 19:15:58 2021 UTC (19 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.2: +4 -4
lines
Diff to previous 1.2 (colored)
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.
Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 20 19:04:50 2021 UTC (19 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.1: +4 -4
lines
Diff to previous 1.1 (colored)
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 1.1 / (download) - annotate - [select for diffs], Tue Apr 6 13:17:04 2021 UTC (21 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
lint: move check for strict bool mode into separate file No functional change.