The NetBSD Project

CVS log for src/tests/usr.bin/xlint/lint1/expr_sizeof.c

[BACK] Up to [cvs.NetBSD.org] / src / tests / usr.bin / xlint / lint1

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 5 10:13:39 2023 UTC (6 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +2 -3 lines
Diff to previous 1.13 (colored)

lint: implement __builtin_offsetof for the simplest cases

Cases not covered:
1. C99 allows designators in the offsetof macro.
2. For packed types, the offset is likely to be incorrect.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jul 9 11:18:55 2023 UTC (7 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

lint: clean up wording in diagnostics

Use the term 'parameter' as defined in C99 3.15.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 30 21:06:18 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.11: +2 -3 lines
Diff to previous 1.11 (colored)

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.11 / (download) - annotate - [select for diffs], Fri Jun 30 16:39:17 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.10: +38 -1 lines
Diff to previous 1.10 (colored)

tests/lint: extend tests for sizeof and alignof

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jun 30 15:19:09 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

lint: fix computation of bit-field width

When bit-fields in packed structs were added on 2009-10-02, lint assumed
that they would only use 'signed int' or 'unsigned int' as storage unit,
even though C99 also allows _Bool.

The cleanup commit for decl.c 1.225 from 2021-08-28 accidentally changed
the rounding mode for bit-field storage units from round-up to
round-down.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 30 09:21:52 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.8: +7 -6 lines
Diff to previous 1.8 (colored)

tests/lint: add more tests for sizeof, offsetof, alignof

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jun 30 08:03:01 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.7: +24 -1 lines
Diff to previous 1.7 (colored)

tests/lint: extend test for sizeof and offsetof

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jun 30 07:18:02 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.6: +41 -1 lines
Diff to previous 1.6 (colored)

tests/lint: demonstrate bugs in anonymous struct/union handling

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 28 21:41:27 2023 UTC (8 months ago) by rillig
Branch: MAIN
Changes since 1.5: +28 -1 lines
Diff to previous 1.5 (colored)

tests/lint: demonstrate wrong size calculation in anonymous union

Revision 1.5 / (download) - annotate - [select for diffs], Tue Mar 28 14:44:34 2023 UTC (11 months ago) by rillig
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 16 00:37:59 2023 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

tests/lint: fix typo in comment

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jan 15 13:55:06 2023 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.2: +7 -2 lines
Diff to previous 1.2 (colored)

tests/lint: fix test for sizeof with variable-length array

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jan 15 13:30:04 2023 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.1: +20 -3 lines
Diff to previous 1.1 (colored)

tests/lint: add more tests for sizeof

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jan 15 00:53:19 2023 UTC (13 months, 2 weeks ago) by rillig
Branch: MAIN

tests/lint: add test for parsing sizeof expressions

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>