CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 04:09:10 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: add grammar rule type_attribute_list_opt Since type attributes (and GCC attributes as well) often modify the preceding identifier,

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 03:55:54 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: clean up grammar enum_decl_lbrace was only used once and was small enough to be inlined. Renamed expr_statement and added

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 03:35:07 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: clean up grammar for member declarations No functional change. To generate a diff of this commit: cvs rdiff -u -r1.268 -r1.269

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 03:22:47 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: move optional grammar rules above their corresponding rules No functional change. To generate a diff of this commit: cvs rdiff -u

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 03:14:56 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: remove irrelevant type information from __attribute__ tokens The grammar once declared that an __attribute__ contained type

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 03:10:39 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: remove double negation in comment No functional change. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 03:19:17 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: move grammar rules for generic_selection around They were misplaced between the statements, as they belong to the expressions, as

CVS commit: src/usr.bin/xlint/lint1

2021-07-07 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Jul 8 02:59:22 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c lint1.h Log Message: lint: constify keyword in lexer No functional change. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 21:41:36 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document further shift/reduce conflicts These cannot be resolved as easily as those from the previous commit. Anyway, the relevant

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 20:56:38 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document the cause for 24 of the 162 grammar conflicts To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 20:29:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: resolve conflict in grammar for __real__ and __imag__ There is no need for extra rules for '__real__(term)' since that is already

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 20:17:15 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: __real__ and __imag__ are GNU extensions https://gcc.gnu.org/onlinedocs/gcc/Complex.html To generate a diff of this commit: cvs

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 19:08:28 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: do not allow _Alignas (from C11) or __packed after a label To generate a diff of this commit: cvs rdiff -u -r1.261 -r1.262

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 18:28:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: rename grammar rules for GCC __attribute__ No functional change. To generate a diff of this commit: cvs rdiff -u -r1.260 -r1.261

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 18:22:41 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: move grammar rules for GCC __attribute__ to the bottom In GCC 2.95.3, attributes had already been available for functions,

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 17:52:05 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: align grammar rules for enum-specifier with C99 No functional change. To generate a diff of this commit: cvs rdiff -u -r1.258

CVS commit: src/usr.bin/xlint/lint1

2021-07-06 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 16:02:44 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: document grammar rule that deviates from C99 To generate a diff of this commit: cvs rdiff -u -r1.257 -r1.258

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 05:39:27 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: rearrange and rename grammar rules for parameter declarations Place the notype/type variants close to each other to be able to

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 05:22:34 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: move the grammar rule array_size out of the type/notype section An array size is used in several grammar rules for different types

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 05:12:44 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: reduce grammar conflicts for GCC attributes In all but one case, the use of type_attribute_list introduced an unnecessary ambiguity

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 04:48:17 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: clean up style in grammar No functional change. To generate a diff of this commit: cvs rdiff -u -r1.253 -r1.254

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jul 6 04:44:20 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y externs1.h lint1.h tree.c Log Message: lint: rename type generic_association_types to generic_association The word 'types' was misleading and

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jul 5 19:55:51 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: decl.c Log Message: lint: reduce noise in storage_class_name No functional change. To generate a diff of this commit: cvs rdiff -u -r1.194 -r1.195

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jul 5 19:59:10 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: refer to documentation about the 'notype' rules in the grammar To generate a diff of this commit: cvs rdiff -u -r1.251 -r1.252

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jul 5 19:48:32 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y decl.c lint1.h Log Message: lint: rename dinfo_t.d_stralign to d_sou_align_in_bits When talking about alignment, offset and size of a type, the

CVS commit: src/usr.bin/xlint/lint1

2021-07-05 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jul 5 19:39:12 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: emit1.c Log Message: lint: fix type warnings in emit1.c The plain character strings in strg_t are saved as an array of unsigned char. When such a character

CVS commit: src/usr.bin/xlint/lint1

2021-07-04 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jul 4 16:44:13 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: clean up new_tnode No functional change. To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309

CVS commit: src/usr.bin/xlint/lint1

2021-07-04 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jul 4 09:13:59 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile ckbool.c lint1.h mem1.c tree.c Log Message: lint: in strict bool mode, allow mixed types in generated C code This allows flex lexers to be run

CVS commit: src/usr.bin/xlint/lint1

2021-07-04 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jul 4 08:49:41 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: lint: include scan.c in 'make lint' This theoretically enables strict bool mode for the few remaining code in scan.l. Since scan.l is

CVS commit: src/usr.bin/xlint/lint1

2021-07-04 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jul 4 05:49:20 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: main1.c Log Message: lint: sync stdout and stderr when compiled in debug mode If lint is compiled with -DDEBUG, its debug output goes to stdout, no matter

CVS commit: src/usr.bin/xlint/lint1

2021-07-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jul 3 21:18:41 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: guard against segmentation fault when parsing struct Found by afl. The code that triggers this case is: struct{const}

CVS commit: src/usr.bin/xlint/lint1

2021-07-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jul 3 20:54:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: err.c Log Message: lint: fix segmentation fault on malformed preprocessor output # 0 "" # 0 ""2 Found using afl, does not happen in practice though since

CVS commit: src/usr.bin/xlint/lint1

2021-07-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jul 3 20:43:35 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: main1.c Log Message: lint: make stdout unbuffered in debug mode Some debug log messages are on stdout, others on stderr. Make sure that they occur in the

CVS commit: src/usr.bin/xlint/lint1

2021-07-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jul 3 20:40:17 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix assertion failure in display_expression for bool constants To generate a diff of this commit: cvs rdiff -u -r1.303 -r1.304

CVS commit: src/usr.bin/xlint/lint1

2021-07-02 Thread Roland Illig
Module Name:src Committed By: rillig Date: Fri Jul 2 21:22:26 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckbool.c Log Message: 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

CVS commit: src/usr.bin/xlint/lint1

2021-06-30 Thread Roland Illig
Module Name:src Committed By: rillig Date: Wed Jun 30 12:28:03 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: improve comment about INT keeping t_is_enum To generate a diff of this commit: cvs rdiff -u -r1.298 -r1.299

CVS commit: src/usr.bin/xlint/lint1

2021-06-30 Thread Roland Illig
Module Name:src Committed By: rillig Date: Wed Jun 30 11:29:29 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: func.c Log Message: lint: invert condition in control flow analysis of switch statements The condition previously contained many negations, which was hard to

CVS commit: src/usr.bin/xlint/lint1

2021-06-30 Thread Roland Illig
Module Name:src Committed By: rillig Date: Wed Jun 30 10:25:03 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: inline 'sign' into convert_integer No functional change. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50

CVS commit: src/usr.bin/xlint/lint1

2021-06-29 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 21:16:54 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: externs1.h lex.c tree.c Log Message: lint: rename xsign to convert_integer The term sign-extend was too specific, the function actually does a broader

CVS commit: src/usr.bin/xlint/lint1

2021-06-29 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 21:05:32 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: do not modify tnode_t->tn_type in check_init_expr This is a very small step towards having all shared type_t objects only referenced

CVS commit: src/usr.bin/xlint/lint1

2021-06-29 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 20:44:38 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: do not sign-extend pointers Sign extension only makes sense for integer types. No idea why the code had tried to sign-extend

CVS commit: src/usr.bin/xlint/lint1

2021-06-29 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 13:48:24 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: clean up lex_character_constant No functional change. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48

CVS commit: src/usr.bin/xlint/lint1

2021-06-29 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 10:12:35 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix typos in comment To generate a diff of this commit: cvs rdiff -u -r1.294 -r1.295 src/usr.bin/xlint/lint1/tree.c Please note

CVS commit: src/usr.bin/xlint/lint1

2021-06-29 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 07:37:34 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: tests/lint: do not modify t_integration on "make add-test" The test names are no longer listed individually. To generate a diff of

CVS commit: src/usr.bin/xlint/lint1

2021-06-28 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 29 05:41:45 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: remove comment from grammar rule type_direct_decl The 'identifier' in type_direct_decl is necessary, as demonstrated in the test

CVS commit: src/usr.bin/xlint/lint1

2021-06-28 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jun 28 09:40:53 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: rename grammar rules for abstract declarators The previous name 'decl' was ambiguous, it could have meant declaration as well as

CVS commit: src/usr.bin/xlint/lint1

2021-06-28 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jun 28 09:14:42 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y decl.c Log Message: lint: align grammar with C99 C99 uses type-qualifier-list_opt in section 6.7.5. To generate a diff of this commit: cvs rdiff -u

CVS commit: src/usr.bin/xlint/lint1

2021-06-28 Thread matthew green
Module Name:src Committed By: mrg Date: Mon Jun 28 09:09:14 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: apply sh3 vs lex.c fix for GCC >= 9. use shorter idiom. fixes build issue reported by jdbaker in private email. To generate a diff of

CVS commit: src/usr.bin/xlint/lint1

2021-06-28 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jun 28 09:01:48 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: refrain from renaming the grammar rule 'pointer' That rule is called 'pointer' by C99 as well. No functional change. To generate

CVS commit: src/usr.bin/xlint/lint1

2021-06-28 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Jun 28 08:52:56 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y decl.c externs1.h lint1.h Log Message: lint: rename pqinf_t to qual_ptr and clean up code The 'inf' from the type name meant 'information' and was

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 21:52:18 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: consistently use 'opt' as suffix This corresponds to the usage in the C standards, where 'opt' is used as a subscripted suffix. No

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 21:46:17 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: remove redundant '{ $$ = $1; }' from the grammar In some cases the redundant code had been spelled out, in others it had been left

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 21:36:14 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: reorder grammar rules from big to small No functional change. To generate a diff of this commit: cvs rdiff -u -r1.238 -r1.239

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 18:54:14 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: sort and rename grammar rules for generic selection No functional change. To generate a diff of this commit: cvs rdiff -u -r1.234

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 18:19:13 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: fix uninitialized variable for declaration after statement To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 18:03:05 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: proof-read the C grammar, remove unnecessary %type After the fix from the previous commit (a missing assignment to $$ in an error

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 13:59:29 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: fix undefined behavior after syntax error 'unnamed member' There should really be a linter or other check that guards against

CVS commit: src/usr.bin/xlint/lint1

2021-06-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 27 08:20:50 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y decl.c lint1.h Log Message: lint: fix type of pqinf.p_pcnt A counter that can either be 0 or 1 and is never incremented is not really a counter, it's

CVS commit: src/usr.bin/xlint/lint1

2021-06-25 Thread Tobias Nygren
Module Name:src Committed By: tnn Date: Fri Jun 25 20:17:56 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: ensure defined(HAVE_GCC) before use of ${HAVE_GCC} To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73

CVS commit: src/usr.bin/xlint/lint1

2021-06-22 Thread Martin Husemann
Module Name:src Committed By: martin Date: Tue Jun 22 12:58:28 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile Log Message: Hack to avoid gcc 9 internal compiler error for sh3. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 20:59:09 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: externs1.h print.c Log Message: lint: remove unused print_tnode The function display_expression serves the same purpose and prints more details. To generate

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 20:48:25 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: remove unnecessary call to print_tnode For the possible operators that occur in message 324, print_tnode is equivalent to op_name,

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 20:32:42 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckbool.c lex.c lint1.h print.c tree.c Log Message: lint: rename val_t.v_unsigned to avoid confusion The name v_unsigned suggested that the value would be

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 19:15:58 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckbool.c Log Message: lint: in strict bool mode, treat boolean constants as unsigned In strict bool mode, bool is not an arithmetic type anyway, therefore it

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 19:04:50 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckbool.c lex.c lint1.h print.c tree.c Log Message: lint: rename val_t.v_ansiu to v_unsigned When lint was written in 1995, traditional C was still nearby

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 18:51:50 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: mem1.c Log Message: lint: sprinkle const in memory management No functional change. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 18:44:48 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: fix confusing variable name in lex_wide_character_constant By convention, i is an index, not a count. No functional change. To

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 18:41:27 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: reduce indentation in lexer for character constants No functional change. To generate a diff of this commit: cvs rdiff -u -r1.42

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 18:15:12 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y scan.l Log Message: lint: use different tokens for operators '.' and '->' Before C99, these tokens were only used in member access expressions. C99

CVS commit: src/usr.bin/xlint/lint1

2021-06-20 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Jun 20 11:00:18 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: decl.c Log Message: lint: fix segmentation fault for malformed struct Code to trigger this bug: struct{char a(_)0} Found using afl. To generate a diff of

CVS commit: src/usr.bin/xlint/lint1

2021-06-19 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jun 19 15:23:57 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y init.c lint1.h Log Message: lint: replace undefined behavior with assertion failure Triggered by this malformed code: struct{int; To

CVS commit: src/usr.bin/xlint/lint1

2021-06-19 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jun 19 14:28:04 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: decl.c Log Message: lint: fix assertion failure after syntax error in declaration The code to trigger this case is: (s)(int(int);); This only

CVS commit: src/usr.bin/xlint/lint1

2021-06-19 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jun 19 11:01:23 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: decl.c Log Message: lint: fix internal error for unfinished declaration A translation unit that contains just 'void x' without the trailing semicolon had

CVS commit: src/usr.bin/xlint/lint1

2021-06-19 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sat Jun 19 08:57:25 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: fix endless loop when scanning string or character literals If the code contains an unfinished string or character literal at the

CVS commit: src/usr.bin/xlint/lint1

2021-06-18 Thread Roland Illig
Module Name:src Committed By: rillig Date: Fri Jun 18 20:29:00 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: fix hang on unfinished string literal at end-of-file The input file that triggered this bug was: a"b"c"d Found using afl.

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 20:46:46 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: externs1.h lex.c lint1.h tree.c Log Message: lint: replace array access with function calls First and foremost, the test d_c99_complex_split accessed the

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 18:23:39 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: extract convert_constant_to_floating To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/usr.bin/xlint/lint1/tree.c

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 18:16:11 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: split convert_constant_check_range No functional change. To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 17:17:15 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: merge duplicate code To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/usr.bin/xlint/lint1/tree.c Please note

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 17:13:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: extract convert_constant_check_range No functional change. To generate a diff of this commit: cvs rdiff -u -r1.282 -r1.283

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 16:56:00 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: extract convert_constant_floating No functional change. To generate a diff of this commit: cvs rdiff -u -r1.281 -r1.282

CVS commit: src/usr.bin/xlint/lint1

2021-06-15 Thread Roland Illig
Module Name:src Committed By: rillig Date: Tue Jun 15 08:37:56 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: check-msgs.lua Log Message: tests/lint1: make error handling in the lint1 linter simpler To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11

CVS commit: src/usr.bin/xlint/lint1

2021-06-04 Thread Roland Illig
Module Name:src Committed By: rillig Date: Fri Jun 4 21:12:10 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckgetopt.c Log Message: lint: fix function name in check for getopt No functional change. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10

CVS commit: src/usr.bin/xlint/lint1

2021-05-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon May 3 08:03:45 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: undefine macros for defining keywords after use No functional change. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36

CVS commit: src/usr.bin/xlint/lint1

2021-05-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon May 3 07:30:19 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: remove redundancy when defining classic keywords No functional change. To generate a diff of this commit: cvs rdiff -u -r1.34

CVS commit: src/usr.bin/xlint/lint1

2021-05-03 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon May 3 07:25:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: reduce redundancy when defining GCC attributes This macro would have prevented the unintended inconsistency in the attribute 'pcs'

CVS commit: src/usr.bin/xlint/lint1

2021-05-02 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon May 3 03:46:55 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: lint: fix compiler warning about signedness mismatch No functional change. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32

CVS commit: src/usr.bin/xlint/lint1

2021-05-02 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun May 2 21:48:53 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: decl.c Log Message: lint: extract check_bit_field_type from declare_bit_field No functional change. To generate a diff of this commit: cvs rdiff -u -r1.178

CVS commit: src/usr.bin/xlint/lint1

2021-05-02 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun May 2 20:53:14 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: sort GCC attributes alphabetically in the grammar No functional change. To generate a diff of this commit: cvs rdiff -u -r1.224

CVS commit: src/usr.bin/xlint/lint1

2021-04-30 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Sat May 1 00:08:44 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lex.c Log Message: put back nonnull. I meant to just sort it. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.bin/xlint/lint1/lex.c

CVS commit: src/usr.bin/xlint/lint1

2021-04-30 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Fri Apr 30 19:46:24 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y lex.c Log Message: - add nonstring attribute - allow attributes after labels (for unused) XXX: split the attributes into function, variable, etc

CVS commit: src/usr.bin/xlint/lint1

2021-04-29 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Thu Apr 29 17:11:30 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: Add constructor and destructor attribute priorities To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222

CVS commit: src/usr.bin/xlint/lint1

2021-04-23 Thread Roland Illig
Module Name:src Committed By: rillig Date: Fri Apr 23 20:26:43 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y Log Message: lint: merge duplicate code in grammar for GCC compound expressions This increases the number of shift/reduce conflicts, once again. I

CVS commit: src/usr.bin/xlint/lint1

2021-04-20 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Tue Apr 20 21:48:39 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y lex.c Log Message: Add common attribute To generate a diff of this commit: cvs rdiff -u -r1.219 -r1.220 src/usr.bin/xlint/lint1/cgram.y cvs rdiff

CVS commit: src/usr.bin/xlint/lint1

2021-04-19 Thread Roland Illig
Module Name:src Committed By: rillig Date: Mon Apr 19 13:18:43 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: func.c Log Message: lint: add debug logging for reachability To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/usr.bin/xlint/lint1/func.c

CVS commit: src/usr.bin/xlint/lint1

2021-04-18 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Apr 18 21:53:37 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: Makefile cgram.y Log Message: lint: fix strict bool mode errors in cgram.y The code generated by yacc already adheres to strict bool mode, in default mode as

CVS commit: src/usr.bin/xlint/lint1

2021-04-18 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Apr 18 17:54:33 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: tree.c Log Message: lint: rename parameter to expr That parameter used to be used for a single purpose, later it got used for checking the reachability as

CVS commit: src/usr.bin/xlint/lint1

2021-04-18 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Apr 18 17:36:18 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: ckgetopt.c decl.c err.c externs1.h func.c Log Message: lint: pass pos_t via const pointer Thanks for the suggestion, christos@. To generate a diff of this

CVS commit: src/usr.bin/xlint/lint1

2021-04-18 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Apr 18 10:09:49 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: err.c lint1.h Log Message: lint: rename parameter to diagnostic functions and macros The first parameter is not just an arbitrary number, it's a message ID.

CVS commit: src/usr.bin/xlint/lint1

2021-04-18 Thread Roland Illig
Module Name:src Committed By: rillig Date: Sun Apr 18 10:04:23 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: lint1.h Log Message: lint: align the member access macros for tnode_t To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98

<    1   2   3   4   5   6   7   8   >