CVS log for src/usr.bin/xlint/lint1/init.c
Up to [cvs.NetBSD.org] / src / usr.bin / xlint / lint1
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.271: download - view: text, markup, annotated - select for diffs
Wed Nov 13 04:32:49 2024 UTC (2 weeks, 4 days ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +4 -4
lines
lint: add more details to 'statement not reached' message
In lib/libcompat/regexp/regexp.c, the FAIL macro expands to a compound
statement containing a function call statement and a return statement,
and the macro invocation is followed by a semicolon, forming an extra
empty statement. Which of these statements is unreachable now becomes
clear from the diagnostic, without having to inspect the preprocessed
source code.
Revision 1.270: download - view: text, markup, annotated - select for diffs
Thu Aug 29 20:35:19 2024 UTC (3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +4 -2
lines
lint: support GCC's __auto_type
Fixes PR toolchain/58654.
Revision 1.269: download - view: text, markup, annotated - select for diffs
Thu May 9 20:53:13 2024 UTC (6 months, 3 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630,
perseant-exfatfs-base,
perseant-exfatfs
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +4 -4
lines
lint: add details to message about too many initializers
Revision 1.268: download - view: text, markup, annotated - select for diffs
Sat Mar 30 17:12:26 2024 UTC (8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +4 -4
lines
lint: do not convert array subscripts from size_t to ptrdiff_t
The C standards do not specify a fixed type for an array subscript, it
just has to be an integer type. Previously, query 4 fired for the
ubiquitous expression 'ptr[sz]' when sz had type 'size_t'.
The test platform_ilp32_long is unaffected by this change, as the
integer constant 0x80000000 has type 'unsigned int', while size_t is
'unsigned long' on those platforms, and even though the types 'unsigned
int' and 'unsigned long' have the same value space, there's still a
conversion, at least for now.
Revision 1.267: download - view: text, markup, annotated - select for diffs
Sat Mar 30 16:47:44 2024 UTC (8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +4 -4
lines
lint: reword messages about array subscripts to sound more natural
Revision 1.266: download - view: text, markup, annotated - select for diffs
Fri Mar 29 08:35:32 2024 UTC (8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +6 -39
lines
lint: clean up
Revision 1.265: download - view: text, markup, annotated - select for diffs
Fri Mar 29 07:35:45 2024 UTC (8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +4 -5
lines
lint: fix wording of warning about bit-field initializer
Revision 1.264: download - view: text, markup, annotated - select for diffs
Wed Mar 27 19:28:20 2024 UTC (8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +6 -7
lines
lint: don't use 'long' in diagnostics
The size of 'long' differs between 64-bit and 32-bit platforms.
Eliminate this possible platform-dependency.
Revision 1.263: download - view: text, markup, annotated - select for diffs
Sat Mar 9 13:54:47 2024 UTC (8 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +6 -6
lines
lint: inline accessor macros for tnode_t
Revision 1.262: download - view: text, markup, annotated - select for diffs
Sat Mar 9 13:20:55 2024 UTC (8 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +15 -13
lines
lint: inline accessor macros for type_t
Revision 1.261: download - view: text, markup, annotated - select for diffs
Sun Mar 3 16:09:01 2024 UTC (8 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +3 -3
lines
lint: clean up string parsing and snprintb check
Revision 1.260: download - view: text, markup, annotated - select for diffs
Fri Mar 1 21:52:48 2024 UTC (9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +3 -3
lines
lint: fix misleading initializer for string iterator
The field 'start' marks the start of the previous matching character,
not the current iterator position.
No binary change.
Revision 1.259: download - view: text, markup, annotated - select for diffs
Thu Feb 8 20:45:20 2024 UTC (9 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +8 -12
lines
lint: clean up redundant braces
No functional change.
Revision 1.258: download - view: text, markup, annotated - select for diffs
Sat Feb 3 19:25:16 2024 UTC (9 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +8 -2
lines
lint: keep strings in their source representation
This allows further analysis depending on whether individual characters are
escaped as octal, hexadecimal or not at all.
Revision 1.257: download - view: text, markup, annotated - select for diffs
Thu Feb 1 18:37:06 2024 UTC (9 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +3 -3
lines
lint: use standard buffer for storing string values
No functional change.
Revision 1.256: download - view: text, markup, annotated - select for diffs
Sat Jan 13 11:24:57 2024 UTC (10 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +5 -6
lines
lint: clean up grammar for initializers
Revision 1.255: download - view: text, markup, annotated - select for diffs
Thu Jan 11 23:26:39 2024 UTC (10 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +12 -14
lines
lint: clean up enum constants for designators
In intializers and offsetof, both struct and union members are handled
in the same way, thus there is no need to distinguish them.
Revision 1.254: download - view: text, markup, annotated - select for diffs
Tue Jan 9 23:46:54 2024 UTC (10 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +3 -38
lines
lint: allow complex offsetof(type, member-designator)
Both GCC 11 and Clang 8 accept member-designators that are not
identifiers but designator sequences, such as in 'offsetof(struct stat,
st_atim.tv_sec)', so make lint accept them as well.
Revision 1.253: download - view: text, markup, annotated - select for diffs
Sun Dec 10 14:59:47 2023 UTC (11 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +4 -4
lines
lint: clean up comments
No functional change.
Revision 1.252: download - view: text, markup, annotated - select for diffs
Sun Dec 3 13:12:40 2023 UTC (11 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +12 -13
lines
lint: re-wrap comments
No functional change.
Revision 1.251: download - view: text, markup, annotated - select for diffs
Sat Dec 2 21:50:20 2023 UTC (11 months, 4 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +2 -3
lines
lint: remove redundant empty lines
No functional change.
Revision 1.250: download - view: text, markup, annotated - select for diffs
Sun Jul 30 22:27:21 2023 UTC (16 months ago) by rillig
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +2 -4
lines
lint: in debug mode, default to indenting the debug log
Only the 'parsing' lines are not indented, as line breaks are
independent from the structure of the code.
Revision 1.249: download - view: text, markup, annotated - select for diffs
Fri Jul 21 06:02:07 2023 UTC (16 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +4 -4
lines
lint: reword message about non-constant initializer
Revision 1.248: download - view: text, markup, annotated - select for diffs
Sat Jul 15 15:51:22 2023 UTC (16 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +7 -10
lines
lint: clean up duplicate code for finding struct/union members
Revision 1.247: download - view: text, markup, annotated - select for diffs
Sat Jul 15 13:35:24 2023 UTC (16 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +3 -3
lines
lint: add detailed logging for finding memory allocation bugs
Revision 1.246: download - view: text, markup, annotated - select for diffs
Thu Jul 13 08:40:38 2023 UTC (16 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +3 -3
lines
lint: indent copyright lines consistently
Revision 1.245: download - view: text, markup, annotated - select for diffs
Mon Jul 10 09:51:30 2023 UTC (16 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +3 -3
lines
lint: clean up wchar_t and hash tables
Revision 1.244: download - view: text, markup, annotated - select for diffs
Sat Jul 1 06:09:24 2023 UTC (17 months ago) by rillig
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +3 -15
lines
lint: fix initialization of unnamed union member
Revision 1.243: download - view: text, markup, annotated - select for diffs
Fri Jun 30 21:06:18 2023 UTC (17 months ago) by rillig
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +11 -4
lines
lint: fix handling of unnamed struct/union members
The support for unnamed struct/union members that was added in decl.c
1.60 from 2015-10-13 was simple but wrong. It didn't cover initializers
of these structures and computed wrong sizes for structures containing
anonymous unions. At that time, the handling of initializers was broken
as well, it was fixed 6 years later in init.c 1.229 from 2021-12-22.
Real-life examples for code that lint couldn't handle are:
* external/bsd/jemalloc/dist/src/jemalloc.c
* external/mit/xorg/lib/dri.old/Makefile
Revision 1.242: download - view: text, markup, annotated - select for diffs
Mon May 22 17:53:27 2023 UTC (18 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +3 -2
lines
lint: fix emitted type for arrays of unknown size
Revision 1.241: download - view: text, markup, annotated - select for diffs
Sat Apr 22 17:49:15 2023 UTC (19 months, 1 week ago) by rillig
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +5 -5
lines
lint: rename type_t.t_str to t_sou
The name 't_str' could have meant 'string' or 'struct'. Since both
struct and union types have members, rename it to 't_sou'.
No functional change.
Revision 1.240: download - view: text, markup, annotated - select for diffs
Mon Feb 6 21:01:55 2023 UTC (21 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +4 -4
lines
lint: eliminate unnecessary indirection
No functional change.
Revision 1.239: download - view: text, markup, annotated - select for diffs
Mon Feb 6 20:50:34 2023 UTC (21 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +53 -94
lines
lint: condense code for handling initializations
Remove the assertion for a non-null initialization, as each code path
immediately dereferences it.
No functional change.
Revision 1.238: download - view: text, markup, annotated - select for diffs
Fri Jan 13 19:41:50 2023 UTC (22 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +4 -5
lines
lint: remove custom memory allocator
Besides adding complexity, the custom memory allocator didn't invalidate
freed memory, which made it harder to find possible use-after-free bugs.
Revision 1.237: download - view: text, markup, annotated - select for diffs
Sun Aug 28 12:04:47 2022 UTC (2 years, 3 months ago) by rillig
Branches: MAIN
CVS tags: netbsd-10-base,
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
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +3 -3
lines
lint: clean up visual clutter
No functional change.
Revision 1.236: download - view: text, markup, annotated - select for diffs
Wed Jun 22 19:23:17 2022 UTC (2 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +3 -3
lines
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.235: download - view: text, markup, annotated - select for diffs
Fri May 20 21:18:55 2022 UTC (2 years, 6 months ago) by rillig
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +3 -3
lines
lint: use __RCSID in lint mode as well
Since 1995-10-02, lint supports __asm statements and __asm modifiers.
No binary change.
Revision 1.234: download - view: text, markup, annotated - select for diffs
Sat Apr 30 21:38:03 2022 UTC (2 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +5 -5
lines
lint: inline macro 'tflag'
The definition of the macro tested both allow_trad and allow_c90, but
there is only a single mode in which allow_c90 is false, therefore it
suffices to test only that.
While double-checking each occurrence of tflag individually, I learned
why lint performs lookups of struct members only by name, independently
of the struct in which they are declared. See typeok_arrow for details.
No functional change.
Revision 1.233: download - view: text, markup, annotated - select for diffs
Sat Apr 2 22:38:45 2022 UTC (2 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +5 -5
lines
lint: clean up style
Remove outdated ARGSUSED (the one in tree.c had been wrong since 1995),
remove unused argument.
No functional change.
Revision 1.232: download - view: text, markup, annotated - select for diffs
Sun Feb 27 10:31:58 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +3 -3
lines
lint: encode lifetime of allocated memory in function names
No functional change.
Revision 1.231: download - view: text, markup, annotated - select for diffs
Sun Feb 27 08:31:26 2022 UTC (2 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +3 -3
lines
lint: encode lifetime of allocated memory in the function names
No functional change.
Revision 1.230: download - view: text, markup, annotated - select for diffs
Wed Dec 22 14:35:23 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +4 -5
lines
lint: clean up initialization
No functional change.
Revision 1.229: download - view: text, markup, annotated - select for diffs
Wed Dec 22 00:45:53 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +400 -314
lines
lint: fix handling of initializations
The implementation from March 2021 added proper support for designators
but didn't model the brace levels correctly. In particular, it could
not handle additional braces or omitted braces. In such a case, lint
skipped the remaining initializers from the initialization. Due to
this, type errors in the remaining initializers went unnoticed. Another
effect was that arrays of unknown size were wrongly reported as having
size 0.
Both GCC and Clang recommend placing braces around each sub-type that is
initialized, such as a struct, union or array. Postfix does not follow
these recommendations, therefore lint had to be disabled in
external/ibm-public/postfix/Makefile.inc. This commit fixes the bugs
mentioned there.
Revision 1.228: download - view: text, markup, annotated - select for diffs
Tue Dec 21 22:21:11 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +5 -4
lines
lint: reword message 187 about too long string literal for initializer
The previous message was imprecise in that it didn't distinguish between
non-terminating and terminating null bytes.
Revision 1.227: download - view: text, markup, annotated - select for diffs
Tue Dec 21 21:42:21 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +9 -4
lines
lint: treat incomplete union in the same way as incomplete struct
The newly added tests triggered the assertion in begin_designation since
for incomplete types the initialization is stopped before handling the
first brace.
Revision 1.226: download - view: text, markup, annotated - select for diffs
Tue Dec 21 21:04:08 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +4 -4
lines
lint: rename debug_indent to debug_print_indent
The previous name could be mistaken to mean "increase the indentation of
the debug output". Instead, the function prints the current indentation.
In externs1.h, the macro definition was a duplicate, the macros were
sorted differently than the functions a few lines above.
No binary change.
Revision 1.225: download - view: text, markup, annotated - select for diffs
Tue Dec 21 16:50:11 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +12 -12
lines
lint: make function names a bit more concise
No binary change.
Revision 1.224: download - view: text, markup, annotated - select for diffs
Tue Dec 21 15:15:45 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +15 -15
lines
lint: rename parameters in check_init_expr
An initialization has a left-hand and a right-hand side, reflect this in
the parameter names to avoid confusion.
No binary change.
Revision 1.223: download - view: text, markup, annotated - select for diffs
Mon Dec 20 19:34:01 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +12 -2
lines
lint: add grammar rule for the beginning of a designation
This will be necessary to properly implement handling of initializers
and braced initializer-lists.
No functional change for now since the designation is already reset
after each expression and '}'. To handle initializations properly, the
designation must not be reset after each expression, it must advance to
the next member instead.
Revision 1.222: download - view: text, markup, annotated - select for diffs
Sun Dec 19 23:50:27 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +12 -12
lines
lint: split local variable in initialization_end_brace_level
No functional change.
Revision 1.221: download - view: text, markup, annotated - select for diffs
Sun Dec 19 10:17:00 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +50 -50
lines
lint: add typedef for types in initializations
No binary change except for line numbers in assertions.
Revision 1.220: download - view: text, markup, annotated - select for diffs
Sat Dec 18 13:23:09 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +42 -20
lines
lint: document wrong data structures for modelling initializations
No functional change.
Revision 1.219: download - view: text, markup, annotated - select for diffs
Sat Dec 18 13:06:33 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +14 -13
lines
lint: move maximum seen subscript from brace level to initialization
There is no need to store this information at every brace level since in
any translation unit that survives a conforming C99 compiler, an array
of unknown size is only possible once per initialization, not once per
brace level.
Revision 1.218: download - view: text, markup, annotated - select for diffs
Sat Dec 18 11:25:15 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +32 -50
lines
lint: use vector instead of list for designation in initialization
This change is a prerequisite for fixing the current bugs in handling
initializations. Part of the fix will be designation_pop, which is
costly for a singly linked list.
As a side benefit, memory management becomes simpler and needs fewer
malloc calls.
No functional change.
Revision 1.217: download - view: text, markup, annotated - select for diffs
Fri Dec 17 17:27:19 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +5 -7
lines
lint: reduce code for beginning an initialization
No functional change.
Revision 1.216: download - view: text, markup, annotated - select for diffs
Fri Dec 17 17:21:48 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +28 -48
lines
lint: inline sub-cases of brace_level_sub_type
Having the code in separate functions did not add to the clarity of the
code. The additional information from the function names can be grasped
as easily from the case labels.
No functional change.
Revision 1.215: download - view: text, markup, annotated - select for diffs
Fri Dec 17 11:06:15 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +4 -3
lines
lint: fix initialization with few braces from function
Seen in Postfix, smtp_proto.c.
Revision 1.214: download - view: text, markup, annotated - select for diffs
Fri Dec 17 10:33:23 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +4 -4
lines
lint: fix initialization of array with fewer braces
Seen in Postfix, cleanup_strerror.c.
Revision 1.213: download - view: text, markup, annotated - select for diffs
Fri Dec 17 09:12:45 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +25 -10
lines
lint: work around lint bug in initialization with few braces
Needs a proper fix later, but for now, this workaround allows to run
lint on Postfix again.
Revision 1.212: download - view: text, markup, annotated - select for diffs
Fri Dec 17 01:24:00 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +4 -4
lines
lint: rename is_string_array to is_character_array
The old name was too confusing.
No functional change.
Revision 1.211: download - view: text, markup, annotated - select for diffs
Thu Dec 16 23:46:21 2021 UTC (2 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +3 -3
lines
lint: narrow down parameter of build_name
Passing an arbitrary tokenizer symbol left too much freedom and
uncertainty to the caller, and 0 was a magic number in this context.
No functional change.
Revision 1.210: download - view: text, markup, annotated - select for diffs
Tue Nov 16 21:01:05 2021 UTC (3 years ago) by rillig
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -3
lines
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.209: download - view: text, markup, annotated - select for diffs
Sat Sep 4 12:30:46 2021 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +3 -3
lines
lint: spell out abbreviations in comments
No functional change.
Revision 1.208: download - view: text, markup, annotated - select for diffs
Sat Aug 14 12:46:23 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +8 -10
lines
lint: allow initialization of struct with constant member
The operator INIT, just like RETURN and FARG, initializes an object with
an expression. The target object of such an initialization may be a
struct with constant members.
The operator ASSIGN, on the other hand, is entirely different. It
overwrites the existing value of the object, and this is not allowed for
structs that have a constant member. Therefore it was wrong to use the
operator ASSIGN for initialization.
Revision 1.207: download - view: text, markup, annotated - select for diffs
Tue Aug 10 20:43:12 2021 UTC (3 years, 3 months ago) by rillig
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +3 -2
lines
lint: fix 3 of the 4 wrong messages about lvalue in initial assignment
Revision 1.206: download - view: text, markup, annotated - select for diffs
Sat Jul 31 19:07:52 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +7 -7
lines
lint: clean up debug logging
The calls to debug_step, unlike printf, don't need a trailing newline.
Remove the debug_step0 macro and its relatives since lint already uses
enough other features from C99 that it essentially requires this
standard, which supports varargs macro arguments. Among these features
are __func__ and printf("%zu").
In non-debug mode, do not evaluate the arguments of debug_step.
Evaluating the arguments had caused an internal error when running the
test op_shl_lp64. This is indeed a bug since initdecl should have
initialized the type table for __uint128_t. This had been forgotten
when support for __uint128_t was added in decl.c 1.69 from 2018-09-07.
No functional change.
Revision 1.205: download - view: text, markup, annotated - select for diffs
Sat Jul 31 18:16:42 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +4 -76
lines
lint: extract debug logging to separate file
Lint currently has several different kinds of debug log:
* The -DDEBUG log is controlled at compile time.
* The -d command line options enables some other debug logging.
* The -DYYDEBUG log for parsing is controlled at compile time.
* The -y command line option only has an effect in -DYYDEBUG mode.
Extracting the logging into a separate file is a first step towards
unifying these logs and making the code for debug logging stand out less
than the current #ifdef DEBUG.
No functional change.
Revision 1.204: download - view: text, markup, annotated - select for diffs
Sat Jul 31 11:03:04 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +4 -6
lines
lint: merge duplicate code for generating unqualified type
This is a preparation for fixing the wrong warnings in msg_115.c.
No functional change.
Revision 1.203: download - view: text, markup, annotated - select for diffs
Tue Jul 20 19:44:36 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +3 -3
lines
lint: use consistent naming scheme for functions that build nodes
No functional change.
Revision 1.202: download - view: text, markup, annotated - select for diffs
Tue Jul 20 19:35:53 2021 UTC (3 years, 4 months ago) by rillig
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -3
lines
lint: split 'build' into build_binary and build_unary
No functional change.
Revision 1.201: download - view: text, markup, annotated - select for diffs
Fri Jul 2 22:46:43 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +25 -13
lines
lint: fix initialization of array of unknown size
The size of the resulting array was computed wrong.
Revision 1.200: download - view: text, markup, annotated - select for diffs
Tue Jun 29 21:05:32 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +7 -4
lines
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 via const pointers. Since the types may be shared, it is a
bad idea to try to modify them, so better let the compiler check this.
It's a long way to reach this goal, but this small step is already
possible.
No functional change.
Revision 1.199: download - view: text, markup, annotated - select for diffs
Sat Jun 19 15:23:57 2021 UTC (3 years, 5 months ago) by rillig
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +2 -10
lines
lint: replace undefined behavior with assertion failure
Triggered by this malformed code:
struct{int;
Revision 1.198: download - view: text, markup, annotated - select for diffs
Sun Apr 18 09:53:03 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
CVS tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +23 -5
lines
lint: extend documentation about handling initializations
Revision 1.197: download - view: text, markup, annotated - select for diffs
Sun Apr 18 09:50:00 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +5 -6
lines
lint: remove redundant test for tflag in initialization handling
Revision 1.196: download - view: text, markup, annotated - select for diffs
Sun Apr 18 08:00:13 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +2 -16
lines
lint: fix storage class of compound literal in initializer
A compound literal that occurs at block_level 0 does not have storage
class AUTO. Instead, its storage class is either EXTERN or STATIC.
While removing the temporary objects from the symbol table had prevented
the assertion, it did not properly fix the underlying problem, which was
that since C99 the initializers can contain references to unnamed
objects that are created on-the-fly. For C90 it was correct to always
use AUTO as the storage class of a temporary symbol.
Revision 1.195: download - view: text, markup, annotated - select for diffs
Sat Apr 17 21:20:08 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +16 -2
lines
lint: fix assertion failure for temporary objects in initialization
Revision 1.194: download - view: text, markup, annotated - select for diffs
Fri Apr 9 23:03:26 2021 UTC (3 years, 7 months ago) by rillig
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +17 -12
lines
lint: fix initialization with brace-enclosed string literal
C99 allows this form in 6.7.8p14 and p15.
The previous lint tests did not cover the case of an array at the top
level of the object to be initialized, they only covered the error cases
(d_c99_init.c, variables 'prefixed_message' and 'message_with_suffix').
Lint is now more generous than strictly required by C99, but since GCC
and Clang already cover the case of 'message_with_suffix', this is ok.
The test d_init_array_using_string.c was wrong before in rejecting the
initializer for 'extra_braces'. I had tested that Clang generated a
warning for this, but I had not inspected its warning carefully enough.
Clang had not warned about the extra braces but only about a type
mismatch since I tested on a platform where wchar_t was 16 bit.
Revision 1.193: download - view: text, markup, annotated - select for diffs
Fri Apr 2 14:50:47 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +13 -14
lines
lint: reorder struct members to be in comprehension order
No functional change.
Revision 1.192: download - view: text, markup, annotated - select for diffs
Fri Apr 2 14:32:27 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +25 -27
lines
lint: rename members of brace_level
The terms 'member' and 'subscript' are distinctive enough.
No functional change.
Revision 1.191: download - view: text, markup, annotated - select for diffs
Fri Apr 2 14:19:33 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +2 -8
lines
lint: remove unused brace_level.bl_array_of_unknown_size
Since init.c 1.177 from 2021-03-29, the type of the object to be
initialized is no longer modified in the middle of the initialization,
as required by C99 6.7.8p22. Therefore it is no longer necessary to
keep this redundant information around.
No functional change.
Revision 1.190: download - view: text, markup, annotated - select for diffs
Fri Apr 2 12:16:50 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +5 -5
lines
lint: add parentheses after sizeof, as required by share/misc/style
No functional change.
Revision 1.189: download - view: text, markup, annotated - select for diffs
Fri Apr 2 11:53:25 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +5 -5
lines
lint: rename functions for duplicating types
No functional change.
Revision 1.188: download - view: text, markup, annotated - select for diffs
Fri Apr 2 10:13:03 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +5 -5
lines
lint: name memory allocation functions consistently
No functional change.
Revision 1.187: download - view: text, markup, annotated - select for diffs
Fri Apr 2 09:39:25 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -3
lines
lint: rename mbl to memory_block
No functional change.
Revision 1.186: download - view: text, markup, annotated - select for diffs
Fri Apr 2 08:38:44 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +13 -10
lines
lint: make debug logging compatible with C90
The previous code used the GCC-style varargs macros, which did not even
conform to C99.
No functional change.
Revision 1.185: download - view: text, markup, annotated - select for diffs
Thu Apr 1 14:20:30 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +9 -9
lines
lint: do not error out of a struct is initialized without braces
This allows to process lib/libc/gen/sysctl.c 1.38 from 2021-03-30, as
well as its precedessor 1.37, which had a workaround just for lint.
While unusual, C99 allows these.
Revision 1.184: download - view: text, markup, annotated - select for diffs
Tue Mar 30 20:23:30 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +23 -39
lines
lint: clean up duplicate code in handling of initialization
No functional change.
Revision 1.183: download - view: text, markup, annotated - select for diffs
Tue Mar 30 16:07:07 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +7 -2
lines
lint: add error about out-of-bounds array subscripts
This check is not strictly necessary since any C99 compiler must
diagnose them as well, it is rather meant for demonstrating how to do
the check in lint, and for symmetry with the 'unknown member' error
message. These provide insight into how the data structures in init.c
are meant to be accessed.
Revision 1.182: download - view: text, markup, annotated - select for diffs
Tue Mar 30 15:18:19 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +4 -5
lines
lint: add type information for message about unknown member name
Revision 1.181: download - view: text, markup, annotated - select for diffs
Tue Mar 30 15:10:46 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -4
lines
lint: reword message for very unlikely .member in array initialization
Revision 1.180: download - view: text, markup, annotated - select for diffs
Tue Mar 30 15:07:53 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +4 -5
lines
lint: add type information to message 175
Revision 1.179: download - view: text, markup, annotated - select for diffs
Tue Mar 30 14:25:28 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +440 -844
lines
lint: rewrite handling of initializations, fixing several bugs
The previous implementation had a wrong model of how initialization
happens in C99, its assertions failed in all kind of edge cases and it
was not possible to fix the remaining bugs one at a time without running
into even more obscure assertion failures.
The debug logging was detailed but did not help to clarify the
situation. After about 20 failed attempts at fixing the small details I
decided to start all over and rewrite the initialization code from
scratch. I left the low-level parts of handling designators, the code
that is independent of brace_level and the high-level parts of how the
parser calls into this module. Everything else is completely new.
The concept of a brace level stays since that is how C99 describes
initialization. The previous code could not handle multi-level
designations (see d_init_pop_member.c). There are no more assertion
failures in the initialization code.
Some TODO comments have been left in the tests to keep the line numbers
the same in this commit. These will be cleaned up in a follow-up
commit.
The new implementation does not handle initialization with "missing"
braces. This is an edge case that both GCC and Clang warn about, so it
is not widely used. If necessary, it may be added later.
The new implementation does not use any global variables in the vast
majority of the functions, to make all dependencies and possible
modifications obvious.
Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Mar 29 21:34:17 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +159 -159
lines
lint: rename variable 'level' to 'bl'
For consistency with its type prefix and the other variables. This
variable is used so often that it makes sense to abbreviate it.
No functional change.
Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Mar 29 21:09:21 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +54 -41
lines
lint: add helper functions
No functional change.
Revision 1.176: download - view: text, markup, annotated - select for diffs
Mon Mar 29 20:52:00 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +114 -112
lines
lint: rename struct members in init.c
No functional change.
Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Mar 29 20:39:18 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +34 -9
lines
lint: remove outdated comments, clean up style
No functional change.
Revision 1.174: download - view: text, markup, annotated - select for diffs
Sun Mar 28 20:35:58 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +22 -3
lines
lint: add assertions for aggregate initialization
No functional change.
Revision 1.173: download - view: text, markup, annotated - select for diffs
Sun Mar 28 19:53:58 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +7 -7
lines
lint: add test for assertion failure in initialization
The 'cnt = level->bl_type->t_tspec == STRUCT ? 2 : 1;' in
initialization_push_struct_or_union is obviously wrong since not every
struct has exactly 1 remaining member after the first member that has an
initializer with designation.
This bug started its life in init.c 1.12 from 2002-10-21, a little over
18 years ago.
Revision 1.172: download - view: text, markup, annotated - select for diffs
Sun Mar 28 19:30:08 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +27 -28
lines
lint: split complicated function for looking up struct members
No functional change.
Revision 1.171: download - view: text, markup, annotated - select for diffs
Sun Mar 28 18:33:27 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +4 -8
lines
lint: inline variable in initialization_init_array_using_string
No functional change.
Revision 1.170: download - view: text, markup, annotated - select for diffs
Sun Mar 28 18:28:22 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +12 -28
lines
lint: clean up initialization_init_array_using_string
No functional change.
Revision 1.169: download - view: text, markup, annotated - select for diffs
Sun Mar 28 18:21:28 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +8 -9
lines
lint: clean up initialization_expr
No functional change.
Revision 1.168: download - view: text, markup, annotated - select for diffs
Sun Mar 28 18:18:22 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +19 -15
lines
lint: extract duplicate code to is_string_array
No functional change.
Revision 1.167: download - view: text, markup, annotated - select for diffs
Sun Mar 28 18:01:57 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +12 -6
lines
lint: add is_struct_or_union
No functional change.
Revision 1.166: download - view: text, markup, annotated - select for diffs
Sun Mar 28 16:28:15 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +18 -8
lines
lint: extract brace_level_subtype
No functional change.
Revision 1.165: download - view: text, markup, annotated - select for diffs
Sun Mar 28 16:19:21 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +12 -7
lines
lint: extract initialization_end_brace_level
No functional change.
Revision 1.164: download - view: text, markup, annotated - select for diffs
Sun Mar 28 15:39:25 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +19 -9
lines
lint: extract check_no_auto_aggregate
No functional change.
Revision 1.163: download - view: text, markup, annotated - select for diffs
Sun Mar 28 14:13:18 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +5 -6
lines
lint: clean up type handling in initialization
No functional change.
Revision 1.162: download - view: text, markup, annotated - select for diffs
Sun Mar 28 14:01:49 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +8 -15
lines
lint: remove wrong warning about wrong initializer type
The following code is valid:
int valid = {{{ 3 }}};
C90 3.5.7 and C99 6.7.8 both say that the "initializer for a scalar
shall be a single expression, optionally enclosed in braces". They
don't put any upper bound on the amount of braces, not even in the
"Translation limits" section.
Revision 1.161: download - view: text, markup, annotated - select for diffs
Sun Mar 28 13:09:43 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +3 -3
lines
lint: sprinkle const on function declarations
No functional change.
Revision 1.160: download - view: text, markup, annotated - select for diffs
Sun Mar 28 11:08:01 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +31 -33
lines
lint: move code for extending an array of unknown size further up
No functional change.
Revision 1.159: download - view: text, markup, annotated - select for diffs
Sun Mar 28 10:58:18 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +75 -75
lines
lint: move code for checking init expressions further up
It did not make sense to have this code between the code for the
designation and the brace level. Since it is independent of all these
types, move it to the top.
No functional change.
Revision 1.158: download - view: text, markup, annotated - select for diffs
Sun Mar 28 10:52:41 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +508 -501
lines
lint: group functions according to their main object
No functional change.
Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun Mar 28 10:09:34 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +6 -8
lines
lint: rename public designator functions
Their previous names were too similar to the actual implementation
functions, which was confusing.
No functional change.
Revision 1.156: download - view: text, markup, annotated - select for diffs
Sun Mar 28 10:05:19 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +10 -12
lines
lint: inline initsym
No functional change.
Revision 1.155: download - view: text, markup, annotated - select for diffs
Sun Mar 28 10:03:02 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +29 -31
lines
lint: replace initstack_push_array with brace_level_push_array
The designator is no longer logged at this point because it is
irrelevant.
No functional change.
Revision 1.154: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:57:31 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +10 -14
lines
lint: clean up debug logging, use consistent variable names
No functional change.
Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:51:16 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +22 -25
lines
lint: omit unnecessary calls to current_init
No functional change.
Revision 1.152: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:46:55 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +47 -41
lines
lint: move brace level functions further up
No functional change.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:43:28 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +7 -18
lines
lint: clean up debug logging for initialization
No functional change.
Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:39:04 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +32 -27
lines
lint: inline initerr in code for handling initializations
No functional change.
Revision 1.149: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:34:45 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +51 -63
lines
lint: inline brace level in initialization
No functional change.
Revision 1.148: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:20:51 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +60 -69
lines
lint: replace global variables with function parameters
No functional change.
Revision 1.147: download - view: text, markup, annotated - select for diffs
Sun Mar 28 09:08:13 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +63 -58
lines
lint: move more functions to the global-variables-free section
No functional change.
Revision 1.146: download - view: text, markup, annotated - select for diffs
Sun Mar 28 08:30:22 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +183 -151
lines
lint: reorder code for handling initializations
First the primitives for debug logging, then the functions that do not
access any global variables, finally everything else.
No functional change.
Revision 1.145: download - view: text, markup, annotated - select for diffs
Sun Mar 28 07:59:09 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +60 -49
lines
lint: move debug primitives to the top of the code
No functional change.
Revision 1.144: download - view: text, markup, annotated - select for diffs
Sat Mar 27 23:18:37 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +19 -12
lines
lint: extract brace_level_next_member from initstack_pop_item_unnamed
No functional change.
Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat Mar 27 22:53:10 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +47 -26
lines
lint: extract brace level code into separate functions
No functional change.
Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat Mar 27 22:35:10 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +50 -23
lines
lint: prepare support for adding array designators
No functional change.
Revision 1.141: download - view: text, markup, annotated - select for diffs
Sat Mar 27 21:56:51 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +14 -8
lines
lint: add function for setting the initialization error
No functional change.
Revision 1.140: download - view: text, markup, annotated - select for diffs
Sat Mar 27 19:59:22 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +16 -16
lines
lint: remove unnecessary typedefs
No functional change.
Revision 1.139: download - view: text, markup, annotated - select for diffs
Sat Mar 27 19:48:00 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +211 -209
lines
lint: rename initstack_element to brace_level
No functional change.
Revision 1.138: download - view: text, markup, annotated - select for diffs
Sat Mar 27 16:37:12 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +37 -27
lines
lint: extract look_up_member from initstack_push_struct_or_union
No functional change.
Revision 1.137: download - view: text, markup, annotated - select for diffs
Sat Mar 27 16:24:21 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +11 -9
lines
lint: clean up initstack_pop_item_named_member
Previously, the code accessed the global variable for the designator
several times, even though the designator cannot change during this part
of the code. Make this obvious by passing this designator as a
parameter instead.
No functional change.
Revision 1.136: download - view: text, markup, annotated - select for diffs
Sat Mar 27 13:17:42 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +3 -5
lines
lint: fix and update comments about initialization
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sat Mar 27 13:08:20 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +20 -15
lines
lint: merge duplicate code in initialization
No functional change.
Revision 1.134: download - view: text, markup, annotated - select for diffs
Fri Mar 26 20:31:07 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +5 -5
lines
lint: in malloc calls, use 'sizeof *ptr' instead of 'sizeof(type)'
No functional change.
Revision 1.133: download - view: text, markup, annotated - select for diffs
Thu Mar 25 22:53:05 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +14 -8
lines
lint: fix initialization for arrays with designators
From the previous commit, there was an off-by-one error left, which was
due to the interaction between designation_add_subscript and
extend_if_array_of_unknown_size.
The other crucial point was to call initstack_pop_nobrace before
accessing the "current initialization stack element". Without this
call, in msg_168.c the "current element" would point to the initializer
level for 'const char *' instead of the one for 'array of const char *'.
One more step towards supporting C99.
Revision 1.132: download - view: text, markup, annotated - select for diffs
Thu Mar 25 22:15:38 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +19 -2
lines
lint: improve initialization of arrays with designators
Initialization is still buggy but better than before. The remaining bug
is that only the first designator determines the array size, and after
that, the array is no longer considered of unknown size. This
contradicts C99. More improvements to come.
Revision 1.131: download - view: text, markup, annotated - select for diffs
Thu Mar 25 21:51:55 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +11 -11
lines
lint: fix names of functions dealing with designations
These functions modify the whole designation, not only a single
designator.
No functional change.
Revision 1.130: download - view: text, markup, annotated - select for diffs
Thu Mar 25 21:45:10 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +6 -6
lines
lint: free the designator as soon as it is no longer needed
One of the latest "refactorings" introduced a small and practically
unimportant memory leak. If the last initializer in an initialization
had a designator, that designator was not freed.
When the "current initialization" was still a global variable with
unlimited lifetime, it was freed at the beginning of the next
initialization. After the refactorings, this "next initialization"
could no longer see anything from the previous initialization since all
references have been cleaned up at that point. Freeing the memory so
late and in an almost totally unrelated place was a bad idea anyway.
Revision 1.129: download - view: text, markup, annotated - select for diffs
Thu Mar 25 21:36:41 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +33 -25
lines
lint: distinguish between read and write access to initstk
There are far too many places that modify the top element of the
initializer stack. Each of these places should get its own logging, as
long as the code is still complicated. These places are now clearly
marked with initstk_lvalue.
No functional change.
Revision 1.128: download - view: text, markup, annotated - select for diffs
Thu Mar 25 21:07:52 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +54 -55
lines
lint: replace namlist with designation and designator
This makes it possible to accurately model C99 initializers, including
their optional designators. Previously, array subscripts had not been
modeled at all.
In the previous commit, debug_designation crashed immediately since I
had not run the code in debug mode even once. The condition 'name !=
head' was a left-over from the old times where the designator was still
a circular list.
No functional change outside debug mode.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu Mar 25 20:38:16 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +19 -24
lines
lint: remove over-engineered doubly-linked circular list
The designation only needs to be navigated from head to tail, not the
other way round.
No functional change.
Revision 1.126: download - view: text, markup, annotated - select for diffs
Thu Mar 25 20:11:18 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +19 -20
lines
lint: rename debug_named_member to debug_designation
No functional change outside debug mode.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Mar 25 19:48:25 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +17 -19
lines
lint: rename i_current_object to i_next_member
No functional change outside debug mode.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Thu Mar 25 19:33:44 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +15 -9
lines
lint: rename the few remaining instances of 'namedmem'
No functional change.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Thu Mar 25 19:20:15 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +28 -22
lines
lint: split current_namedmem into lvalue and rvalue form, rename them
This is a small step towards using the terminology from C99.
No functional change.
Revision 1.122: download - view: text, markup, annotated - select for diffs
Thu Mar 25 19:11:18 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +35 -31
lines
lint: inline macro 'namedmem' for C99 designators
No functional change.
Revision 1.121: download - view: text, markup, annotated - select for diffs
Thu Mar 25 16:43:51 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +16 -10
lines
lint: free memory at the end of an initialization
No functional change, just more clarity in the code.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Mar 25 16:30:23 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +15 -13
lines
lint: condense debug output for initializations
This way it does not look more impressive than it really is.
No functional change outside debug mode.
Revision 1.119: download - view: text, markup, annotated - select for diffs
Thu Mar 25 13:10:19 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +157 -29
lines
lint: add comments about things left to do, from code review
No functional change.
Revision 1.118: download - view: text, markup, annotated - select for diffs
Thu Mar 25 01:42:53 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +17 -17
lines
lint: fix C99 initialization with expression of type 'struct'
This has been a long-standing limitation of lint. Now it is almost
ready for C99, see the list of "major changes" in the foreword of C99.
One known remaining bug in the area of initialization is designators
with several levels, such as '.member[2].member.member'. Oh, and
designators for arrays are only supported in the parser but not in the
type checker. There's still some work to do.
Revision 1.117: download - view: text, markup, annotated - select for diffs
Thu Mar 25 00:48:58 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +2 -10
lines
lint: remove outdated comment from init_using_expr
Since C99, an aggregate type can be initialized without braces.
No functional change.
Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Mar 25 00:35:16 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +49 -42
lines
lint: extract check_init_expr from init_using_expr
No functional change.
Revision 1.115: download - view: text, markup, annotated - select for diffs
Tue Mar 23 22:58:08 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +4 -3
lines
lint: fix wrong warning about initialization using string literal
Missing braces after 'if', since init.c 1.68 from 2021-02-20.
GCC 10 doesn't complain about this even with -Wmisleading-indentation
since at least one of the involved lines is a macro invocation (in this
case both lines). GCC 11 will warn about this.
Clang warns about this, but the regular Clang build currently fails for
other reasons, so this problem didn't show up there either.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Tue Mar 23 20:21:07 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +27 -16
lines
lint: extract init_using_assign from init_using_expr
No functional change.
Revision 1.113: download - view: text, markup, annotated - select for diffs
Tue Mar 23 20:14:55 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +12 -21
lines
lint: merge duplicate code in init_using_expr
No functional change.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Mar 23 18:51:43 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +6 -6
lines
lint: fix documentation about optional braces in initializers
Revision 1.111: download - view: text, markup, annotated - select for diffs
Tue Mar 23 18:40:50 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +39 -10
lines
lint: fix wrong error message about type mismatch in compound literal
Now that the code contains explicit markers for starting and ending an
initialization, and having the guarantee that an assertion fails
whenever some code accesses the state of the "current initialization"
even though there is no ongoing initialization gives me much more
confidence in the correctness of the code. The calls to
begin_initialization and end_initialization always appear in pairs,
enclosing the minimal amount of code necessary for initialization.
In a nutshell, global modifiable state is error-prone and hard to
understand.
A nice side effect is that the grammar no longer needs a special rule
for the outermost initializer since the functions for the debug logging
are now called explicitly.
The code that misuses the initialization state just because it needs to
temporarily store a sym_t somewhere is now clearly marked as such. A
GCC statement expression can appear anywhere and is therefore
independent of the initialization. Most probably the code can simply
refer to the local variable in the grammar rule itself, or this variable
needs to be encoded in the grammar %union. For sure there is a better
way to handle this.
There is no longer a need that the function 'declare' initializes the
initialization state, it was just the wrong place to do this.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Tue Mar 23 17:36:56 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +48 -14
lines
lint: add indirection for accessing the current initialization
This indirection will be needed to handle nested initializations, which
are a new feature of C99. These are currently not handled correctly,
see msg_171.c.
No functional change.
Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon Mar 22 19:29:43 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +4 -4
lines
lint: reduce visibility of variables for initializations
No functional change.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Sat Mar 20 08:54:27 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +4 -2
lines
lint: fix assertion failure after error in designation
In d_c99_init.c, the initialization of array_with_designator failed.
The designator '.member' from that initialization was not cleaned up
before starting the next initialization.
Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Mar 20 08:16:30 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -2
lines
lint: replace segmentation fault with assertion failure
Revision 1.106: download - view: text, markup, annotated - select for diffs
Fri Mar 19 18:17:46 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +8 -7
lines
lint: improve debug loggin for initialization
Revision 1.105: download - view: text, markup, annotated - select for diffs
Fri Mar 19 17:37:57 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +6 -6
lines
lint: rename designator_pop_name to designator_shift_name
The entries are removed from the beginning, not from the end.
No functional change.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Fri Mar 19 01:02:52 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +10 -4
lines
lint: replace assertion in initialization with proper error message
Revision 1.103: download - view: text, markup, annotated - select for diffs
Fri Mar 19 00:55:02 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +7 -7
lines
lint: rename push_member and pop_member
These two functions are supposed to model the designator that is used
for initializing structs and arrays. The implementation is still buggy
and does not work at all for C99 designators with multiple names, see
d_init_pop_member.c.
For now, just rename the functions to head in the right direction.
No functional change.
Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Mar 19 00:39:17 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +27 -8
lines
lint: extend documentation about initialization
No functional change.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Fri Mar 19 00:19:32 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +59 -47
lines
lint: split initstack_pop_item into separate functions
No functional change.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Fri Mar 19 00:08:13 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +9 -6
lines
lint: improve debug logging in initstack_push
No functional change outside debug mode.
Revision 1.99: download - view: text, markup, annotated - select for diffs
Thu Mar 18 23:45:20 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +95 -77
lines
lint: split initstack_push into smaller functions
No functional change.
Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Mar 18 23:37:31 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +8 -12
lines
lint: clean up control flow in initstack_push
No functional change.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Mar 18 23:23:40 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +29 -21
lines
lint: extract extend_if_array_of_unknown_size from initstack_push
No functional change.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Thu Mar 18 22:51:32 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +5 -6
lines
lint: replace undefined behavior during initialization with assertion
This only affects code that is already rejected by the compiler.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Mar 18 22:08:05 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +7 -6
lines
lint: improve debug logging during initialization
No functional change outside debug mode.
Revision 1.94: download - view: text, markup, annotated - select for diffs
Thu Mar 18 20:55:58 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +13 -17
lines
lint: reduce debug logging for initialization, update documentation
No functional change outside debug mode.
Revision 1.93: download - view: text, markup, annotated - select for diffs
Thu Mar 18 20:22:50 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +58 -8
lines
lint: document how initialization works, improve debug logging
No functional change outside debug mode.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Mar 18 14:58:44 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +36 -14
lines
lint: document the initialization of an object in more detail
This will help fixing the bugs that are currently demonstrated in
msg_168.c and d_struct_init_nested.c.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Mar 17 15:45:30 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +18 -2
lines
lint: add debug logging for C99-style initialization of arrays
No functional change outside debug mode.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Mar 17 15:37:42 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +52 -55
lines
lint: move debug logging for the designator to the top of the code
The debugging code is needed by the soon-to-be-added proper handling of
array subscript initializers such as '.member[123].member = 12345'.
No functional change.
Revision 1.89: download - view: text, markup, annotated - select for diffs
Mon Feb 22 15:09:50 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +16 -16
lines
lint: change spelling of initialisation to initialization
That's the wording from the ISO C99 standard.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Feb 22 15:01:03 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3
lines
lint: improve debug message and comment
Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Feb 21 15:02:16 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +23 -15
lines
lint: extract check_non_constant_initializer from init_using_expr
No functional change.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Feb 21 14:57:25 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +16 -11
lines
lint: extract check_bit_field_init from init_using_expr
No functional change.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Sun Feb 21 14:19:27 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -4
lines
lint: add debug logging for initializing an array of unknown size
It is possible that the type name 'array[unknown_size]' may spill into
the user-visible diagnostics. The current test suite does not cover
such a case. Anyway, saying 'array[unknown_size]' is still better than
saying 'array[0]', which would be misleading.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun Feb 21 14:02:36 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +23 -30
lines
lint: rename and condense initstack_check_too_many
No functional change.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Feb 21 13:52:21 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +4 -5
lines
lint: remove redundant debug logging
In initstack_pop_nobrace, if anything happens to the initstack, it will
be logged by initstack_pop_item.
In init_using_expr, the address of the node is irrelevant, the node's
contents has already been logged above.
Revision 1.82: download - view: text, markup, annotated - select for diffs
Sun Feb 21 13:13:14 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +23 -12
lines
lint: document i_brace, add comments, rename initstack_string
No functional change outside debug mode.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Sun Feb 21 11:23:33 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +8 -10
lines
lint: always initialize return values of constant_addr
Before, the caller was responsible for initializing the return values
from the function. This was an unexpected burden.
Ensure that in each branch that returns true, both return values are
properly set.
Strangely, the only caller of that function, init_using_expr, uses
neither of the return values. It just tests whether the expression is
constant or not.
No functional change.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Feb 21 10:03:35 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +20 -19
lines
lint: clean up debug logging in initstack_pop_item
The debug logging contained much redundant information and was
misleading in a few places. For example, "pop" did not actually pop an
item, plus there are several things that could be popped, so that didn't
help either.
Sprinkle some comments in places where the code needs to become clearer.
No functional change outside debug mode. The condition
'istk->i_remaining >= 0' was redundant due to the assertion directly
above it.
Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Feb 21 09:24:32 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +15 -15
lines
lint: rename istk to initstack_element
The longer name is more expressive and more correct. The previous name
called each stack element a stack itself, which was unnecessarily
confusing.
No functional change.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Feb 21 08:27:41 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +26 -23
lines
lint: reduce amount of debug output during initialization
Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Feb 21 08:01:14 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +78 -43
lines
lint: rename members of struct istk to be more expressive
No functional change outside debug mode.
Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Feb 21 07:21:57 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3
lines
lint: indent node details in debug mode
Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Feb 20 19:56:44 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +9 -9
lines
lint: fix lint warning 'expression has null effect'
Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Feb 20 19:10:38 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +21 -14
lines
lint: fix lint warnings
No functional change.
Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Feb 20 17:44:39 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +60 -2
lines
lint: in debug mode, print the initialization stack
This is the central data structure of the initializations, it keeps
track of the objects that still need to be initialized. Seeing its
contents in debug mode helps in finding and understanding the still
incomplete C99 support.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat Feb 20 17:24:37 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +6 -2
lines
lint: define debug_named_member only in debug mode
In non-debug mode it was an expensive no-op.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Feb 20 17:12:00 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +11 -4
lines
lint: document an assumption that has turned wrong with C99
Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Feb 20 16:34:57 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +8 -10
lines
lint: extend debugging for initializing objects
No functional change outside debug mode.
Revision 1.69: download - view: text, markup, annotated - select for diffs
Sat Feb 20 16:03:56 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3
lines
lint: rename mkinit to init_using_expr
No functional change outside debug mode.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sat Feb 20 15:23:07 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +154 -66
lines
lint: add hierarchical debug logging for initializations
No functional change for default mode.
Revision 1.67: download - view: text, markup, annotated - select for diffs
Fri Feb 19 22:16:12 2021 UTC (3 years, 9 months ago) by rillig
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +6 -4
lines
lint: rename str_t and its members to be more expressive
No functional change.
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Jan 31 12:44:34 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +4 -4
lines
lint: don't warn about constant condition in 'do { } while (0)'
Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Jan 30 18:16:45 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +7 -6
lines
lint: rename incompl to is_incomplete
No functional change.
Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Jan 17 15:40:27 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -3
lines
lint: fix return type of conaddr
Revision 1.63: download - view: text, markup, annotated - select for diffs
Sat Jan 16 16:53:23 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +12 -12
lines
lint: replace integer constant expressions with true and false
LINTFLAGS=-gST make lint, with manual review.
The error messages from lint are all correct, they are not complete
though. The return value of a function returning bool may still be
compared to the integer 0.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Jan 16 02:40:02 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +22 -22
lines
lint: replace 0 and 1 with false and true, where appropriate
Change in behavior: Passing the option -h exactly 4294967296 times or
any multiple thereof is no longer equivalent to passing it never at all,
it is now equivalent to passing it once. See main2.c, hflag++ for the
actual change.
Other than that, no functional change intended.
A very large portion of the code already conformed to the requirements
of the strict bool mode. The only missing thing was using the constant
literals false and true instead of 0 and 1. For sure there are some
integer literals left that can be converted. For now, all literals that
appeared in the form " = 0" or " = 1" have been replaced.
Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Jan 10 00:05:46 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +9 -12
lines
lint: rename type classification macros
The previous names tspec_is_int and tspec_is_uint were confusing because
there are actually tspec_t constants called INT and UINT, these
classification macros return true for other integer types as well,
though.
While here, remove the prefix "tspec_" from these macros. It wasn't as
helpful as intended, in many cases it was obviously redundant, when it
was called as tspec_is_integer(tn->tn_type->t_tspec).
No functional change.
Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Jan 3 20:31:08 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3
lines
lint: rename functions that create nodes
Revision 1.59: download - view: text, markup, annotated - select for diffs
Sun Jan 3 19:10:47 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +4 -4
lines
lint: rename type.t_isfield to t_bitfield
Revision 1.58: download - view: text, markup, annotated - select for diffs
Sun Jan 3 17:42:45 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -3
lines
lint: let gnuism and c99ism return void instead of int
The return value was only used in a single case. Duplicating the
condition for printing a message is ok in that case, since it makes all
other places in the code simpler.
The occasional "(void)" or "msg = " before the function call had hidden
the calls from check-msgs.lua, which didn't check the message texts in
such cases.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Jan 2 03:49:25 2021 UTC (3 years, 10 months ago) by rillig
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +14 -25
lines
lint: fix buffer truncation for type names
Previously, most type names had been cut off after 63 significant
characters. In some cases, 127 characters survived, or 255. And for
the debugging messages, sometimes even 1023. This inconsistency was
useless.
It was wrong in the first place to make the caller of the function
tyname responsible for handling the buffer. That's not something a
caller of such a simple function should do. These callers have better
things to do.
The API of the new function type_name is as simple as possible.
In the implementation, the name of the type is generated anew each time.
I just didn't know whether the type details could change, once the type
is initialized, and I didn't want to find out. To be on the safe side,
the resulting type name is cached, independently of the type it was
generated for. Using a trivial, unbalanced binary tree should be good
enough for now.
All this work is necessary to support adding new debug logging, without
being distracted by irrelevant implementation details such as these
buffer sizes. Adding new debug messages should be fun and easy; up to
now, it was overly bureaucratic.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Jan 2 01:06:15 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +5 -5
lines
lint: use bool instead of u_int:1 in structures
Better late than never.
Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Jan 1 20:02:56 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +32 -3
lines
lint: add debug logging for initialization using named members
Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Jan 1 19:28:51 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +15 -2
lines
lint: document that C99-style initialization is necessarily buggy
Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Jan 1 19:15:58 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +24 -8
lines
lint: un-export struct istk
Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Jan 1 19:11:19 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4
lines
lint: fix wrong warning about bitfield in C99 structure initialization
The variable namemem is supposed to be a circular list, which is
"documented" implicitly in push_member.
The implementation was buggy though. In pop_member, the circular list
was destroyed though. Given the list (capital, major, favorite_color,
green), removing capital made major point to itself in the forward
direction, even though it should not have been modified at all.
In the test, I had been too optimistic to quickly understand the code
around variable initialization. I was wrong though, so I had to adjust
the comments there to reality.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Jan 1 16:50:47 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +9 -5
lines
lint: demonstrate bug in handling of nested C9X struct initializers
Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri Jan 1 11:41:01 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +4 -3
lines
lint: add missing redundant messages in source code
Revision 1.49: download - view: text, markup, annotated - select for diffs
Fri Jan 1 00:00:24 2021 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +4 -4
lines
lint: align comments in code with actual messages
Redundancy is bad. Especially in this case, separating the format
strings from the actual arguments prevents the compiler from
cross-checking them.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Dec 30 11:04:48 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +5 -5
lines
lint: un-abbreviate s_field, s_keyw and s_xsym
Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Dec 30 10:56:51 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -3
lines
lint: un-abbreviate parenthesized and _strg
Revision 1.46: download - view: text, markup, annotated - select for diffs
Wed Dec 30 10:46:11 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +12 -12
lines
lint: rename more _nxt members to _next
Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Dec 30 10:26:12 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +5 -5
lines
lint: rename s_nxt to s_next
Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Dec 30 01:33:30 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +12 -20
lines
lint: reduce verbosity of assertions
Having 2 lines of source code per assertion is too much, especially
since most of this code is redundant anyway. Extract the common code
and the additional negation into a simple function instead.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Dec 29 23:12:48 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +27 -25
lines
lint: rename istk_t.i_cnt to i_remaining
Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Dec 29 20:56:28 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +7 -6
lines
lint: untangle conditions in initstack_next_nobrace
Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Dec 29 20:07:04 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +8 -9
lines
lint: clean up debug logging for initializations
Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Dec 29 19:57:44 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +26 -25
lines
lint: make debug output for initializations more uniform
Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Dec 29 19:09:53 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -8
lines
lint: remove redundant function prototypes
Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Dec 29 19:02:16 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +14 -11
lines
lint: improve debug output for initializing structs
Still trying to find out where the wrong warning in d_struct_init_nested
comes from.
Revision 1.37: download - view: text, markup, annotated - select for diffs
Tue Dec 29 16:59:12 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +42 -43
lines
lint: split initstack_next into separate functions
Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Dec 29 16:53:36 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +34 -33
lines
lint: split initstack_pop into separate functions
Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Dec 29 16:48:53 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +37 -37
lines
lint: rename functions for handling the initialization stack
Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Dec 29 13:33:03 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +13 -12
lines
lint: rename functions with very short names
Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Dec 29 11:35:11 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +8 -8
lines
lint: remove redundant parentheses around return value
Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Dec 28 22:31:31 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -6
lines
lint: rename confusing function setcompl
The previous function name suggested that it would set the complete flag
of the type, but it was the exact opposite. To reduce confusion, negate
the meaning of the parameter.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Dec 28 19:07:43 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -3
lines
lint: sort includes
Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Dec 28 19:02:16 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +12 -10
lines
lint: realign code
Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Dec 28 18:49:02 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +10 -9
lines
lint: rename tspec macros
Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Dec 28 12:52:45 2020 UTC (3 years, 11 months ago) by rillig
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4
lines
lint1: remove trailing whitespace
Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jul 28 17:55:13 2015 UTC (9 years, 4 months ago) by christos
Branches: MAIN
CVS tags: prg-localcount2-base3,
prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
prg-localcount2,
phil-wifi-base,
phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
phil-wifi,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
pgoyette-compat-merge-20190127,
pgoyette-compat-base,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
pgoyette-compat-0625,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
pgoyette-compat,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646,
netbsd-9-base,
netbsd-9-4-RELEASE,
netbsd-9-3-RELEASE,
netbsd-9-2-RELEASE,
netbsd-9-1-RELEASE,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
netbsd-9,
netbsd-8-base,
netbsd-8-3-RELEASE,
netbsd-8-2-RELEASE,
netbsd-8-1-RELEASE,
netbsd-8-1-RC1,
netbsd-8-0-RELEASE,
netbsd-8-0-RC2,
netbsd-8-0-RC1,
netbsd-8,
matt-nb8-mediatek-base,
matt-nb8-mediatek,
localcount-20160914,
is-mlppp-base,
is-mlppp,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +7 -13
lines
fix member list deallocation; remove #if 0'ed code.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Nov 20 20:49:06 2014 UTC (10 years ago) by christos
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +60 -36
lines
Always set i_brace in the struct case.
Cleanup some debugging.
Revision 1.24.12.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:05:06 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +8 -17
lines
Rebase to HEAD as of a few days ago.
Revision 1.24.22.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:59:20 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +8 -17
lines
Rebase.
Revision 1.24.6.1: download - view: text, markup, annotated - select for diffs
Thu May 22 11:42:52 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +8 -17
lines
sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Apr 17 16:29:26 2014 UTC (10 years, 7 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9,
tls-maxphys-base,
tls-earlyentropy-base,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +8 -17
lines
Don't free memory; it is used later.
Revision 1.24: download - view: text, markup, annotated - select for diffs
Fri Oct 2 18:17:16 2009 UTC (15 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-tag8,
yamt-pagecache-base8,
yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4,
yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-6,
matt-premerge-20091211,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
matt-mips64-premerge-20101231,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2,
agc-symver-base,
agc-symver
Branch point for: yamt-pagecache,
tls-maxphys,
tls-earlyentropy
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3
lines
change initialization from non const of regular variables to c99 instead of
gnu since c99 now has it.
Revision 1.21.6.1: download - view: text, markup, annotated - select for diffs
Tue Aug 18 10:58:33 2009 UTC (15 years, 3 months ago) by bouyer
Branches: netbsd-4-0
Diff to: previous 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21: +5 -4
lines
Pull up following revision(s) (requested by msaitoh in ticket #1353):
usr.bin/xlint/lint1/init.c: revision 1.22
pushinit(): fix a use-after-free bug.
Revision 1.21.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 18 10:58:29 2009 UTC (15 years, 3 months ago) by bouyer
Branches: netbsd-4
Diff to: previous 1.21: preferred, colored; next MAIN 1.22: preferred, colored
Changes since revision 1.21: +5 -4
lines
Pull up following revision(s) (requested by msaitoh in ticket #1353):
usr.bin/xlint/lint1/init.c: revision 1.22
pushinit(): fix a use-after-free bug.
Revision 1.22.10.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:36:11 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +3 -3
lines
sync with head.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Apr 26 16:14:23 2008 UTC (16 years, 7 months ago) by christos
Branches: MAIN
CVS tags: yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
wrstuden-revivesa,
netbsd-5-base,
netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
netbsd-5,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-base2,
jym-xensuspend-nbase,
jym-xensuspend-base,
jym-xensuspend,
hpcarm-cleanup-nbase
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +3 -3
lines
fix "long double" type recognition which broke with the complex changes.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Jan 20 21:16:23 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-baseX,
yamt-pf42-base,
matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-nbase,
matt-armv6-base,
matt-armv6,
keiichi-mipv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf
Branch point for: yamt-pf42
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +5 -4
lines
pushinit(): fix a use-after-free bug.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Oct 15 18:18:54 2006 UTC (18 years, 1 month ago) by christos
Branches: MAIN
CVS tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE
Branch point for: netbsd-4-0,
netbsd-4
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -2
lines
in the same way that we need an extra level for arrays, do the same for struct.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Oct 15 15:08:20 2006 UTC (18 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +13 -7
lines
previous fix broke array initializers.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Oct 14 21:08:50 2006 UTC (18 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +19 -11
lines
Fix c99 initialization issues. Now the regression tests work.
Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 22 07:21:53 2004 UTC (20 years, 5 months ago) by tron
Branches: netbsd-2-0
CVS tags: netbsd-2-base,
netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +6 -2
lines
Pull up revision 1.18 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun Jun 20 22:20:17 2004 UTC (20 years, 5 months ago) by jmc
Branches: MAIN
CVS tags: netbsd-3-base,
netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0,
netbsd-3,
chap-midi-nbase,
chap-midi-base,
chap-midi,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +6 -2
lines
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Dec 6 03:27:39 2002 UTC (22 years ago) by thorpej
Branches: MAIN
CVS tags: netbsd-2-0-base,
fvdl_fs64_base
Branch point for: netbsd-2-0
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -2
lines
Include <string.h> for prototypes.
Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Nov 13 21:50:57 2002 UTC (22 years ago) by christos
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +16 -4
lines
PR/18896: Jason Thorpe: C99 structure member initializers broken for arrays.
XXX: The checking done does not work, but the code passes.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Oct 23 00:36:36 2002 UTC (22 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -4
lines
forgot to commit those.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Oct 22 21:09:34 2002 UTC (22 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +11 -4
lines
handle free-ing of temp symbols properly. Don't segv on bad node types.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Oct 22 13:30:23 2002 UTC (22 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -3
lines
fix spelling in comment.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Oct 21 21:14:52 2002 UTC (22 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +126 -5
lines
support for c99 style and gnu style structure and union named initializers.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Sep 13 14:59:24 2002 UTC (22 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +11 -11
lines
Minimize diffs with my C99 capable version [this commit does not include
C99 support.
- turn lerror() into a macro so that the filename and the line number of the
error are printed before we abort.
- recurse in type printing to provide the proper type name.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jan 31 19:36:54 2002 UTC (22 years, 10 months ago) by tv
Branches: MAIN
CVS tags: netbsd-1-6-base,
netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001,
netbsd-1-6
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -3
lines
Protect __RCSID and __COPYRIGHT from being invoked if not defined.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Sep 18 18:15:54 2001 UTC (23 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3
lines
Give initiali[sz]e all the "i"s it deserves.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Sep 16 16:34:44 2001 UTC (23 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -3
lines
Spell 'occurred' with two 'r's.
Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon May 28 12:40:37 2001 UTC (23 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +23 -23
lines
cleanup (prior to more adding more features):
- convert to ANSI KNF
- remove trailing whitespace
- translate some comments from german into english
code compiles and runs clean, and tested by running "make lint" against
xlint source using previous and this lint produces same results.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Feb 24 00:43:51 2001 UTC (23 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2
lines
fix broken NetBSD RCS id tags
Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Feb 22 15:40:40 1998 UTC (26 years, 9 months ago) by christos
Branches: MAIN
CVS tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
netbsd-1-5-base,
netbsd-1-5-RELEASE,
netbsd-1-5-PATCH003,
netbsd-1-5-PATCH002,
netbsd-1-5-PATCH001,
netbsd-1-5-BETA2,
netbsd-1-5-BETA,
netbsd-1-5-ALPHA2,
netbsd-1-5,
netbsd-1-4-base,
netbsd-1-4-RELEASE,
netbsd-1-4-PATCH003,
netbsd-1-4-PATCH002,
netbsd-1-4-PATCH001,
netbsd-1-4,
minoura-xpg4dl-base,
minoura-xpg4dl,
comdex-fall-1999-base,
comdex-fall-1999
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -2
lines
WARNSify
Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Oct 2 17:21:37 1995 UTC (29 years, 2 months ago) by jpo
Branches: MAIN
CVS tags: netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-PATCH003-CANDIDATE2,
netbsd-1-3-PATCH003-CANDIDATE1,
netbsd-1-3-PATCH003-CANDIDATE0,
netbsd-1-3-PATCH003,
netbsd-1-3-PATCH002,
netbsd-1-3-PATCH001,
netbsd-1-3-BETA,
netbsd-1-3,
netbsd-1-2-base,
netbsd-1-2-RELEASE,
netbsd-1-2-PATCH001,
netbsd-1-2-BETA,
netbsd-1-2,
netbsd-1-1-base,
netbsd-1-1-RELEASE,
netbsd-1-1-PATCH001,
netbsd-1-1
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3
lines
prototypes override old style function definitions
this is a gnu extension to ansi c
Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Oct 2 17:14:31 1995 UTC (29 years, 2 months ago) by jpo
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4
lines
added inline keywords
"inline" is enabled by -g, "__inline" and "__inline__" are always available
Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Jul 3 21:24:15 1995 UTC (29 years, 5 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -3
lines
RCS id cleanup
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Mon Jul 3 20:56:37 1995 UTC (29 years, 5 months ago) by cgd
Branches: Jochen_Pohl
CVS tags: Jochen_Pohl-950703
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0
lines
lint(1) implementation, by Jochen Pohl. named 'xlint' for a similar
reason to why 'install' is named 'xinstall'.
Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Jul 3 20:56:37 1995 UTC (29 years, 5 months ago) by cgd
Branches: MAIN
Initial revision
CVSweb <webmaster@jp.NetBSD.org>