Linux-Sparse Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/4] fix evaluation of assignment and qualified arrays
@ 2020-07-10  0:13 Luc Van Oostenryck
  2020-07-10  0:13 ` [PATCH 1/4] add a testcase for assignment to const <type> (*)[] Luc Van Oostenryck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luc Van Oostenryck @ 2020-07-10  0:13 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

This series contains a tentative fix for a problem reported
today on the mailing list as well as some related testcases.
The problem concerns the assignment of pointers to const arrays,
like the following code:
	int a[2][3];
	const int (*p)[3] = a;
which was incorrectly given a warning.

Luc Van Oostenryck (4):
  add a testcase for assignment to const <type> (*)[]
  add another testcase  with const array/pointer
  add testcase for missing warning for assignment to const
  [RFC] fix evaluation error with assignment of qualified arrays

 evaluate.c                         |  4 +--
 validation/eval/array-quals-node.c | 29 ++++++++++++++++++
 validation/eval/array-quals0.c     |  6 ++++
 validation/eval/array-quals1.c     | 49 ++++++++++++++++++++++++++++++
 4 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 validation/eval/array-quals-node.c
 create mode 100644 validation/eval/array-quals0.c
 create mode 100644 validation/eval/array-quals1.c

-- 
2.27.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10  0:13 [PATCH 0/4] fix evaluation of assignment and qualified arrays Luc Van Oostenryck
2020-07-10  0:13 ` [PATCH 1/4] add a testcase for assignment to const <type> (*)[] Luc Van Oostenryck
2020-07-10  0:13 ` [PATCH 2/4] add another testcase with const array/pointer Luc Van Oostenryck
2020-07-10  0:13 ` [PATCH 3/4] add testcase for missing warning for assignment to const Luc Van Oostenryck
2020-07-10  0:13 ` [PATCH 4/4] [RFC] fix evaluation error with assignment of qualified arrays Luc Van Oostenryck

Linux-Sparse Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sparse/0 linux-sparse/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sparse linux-sparse/ https://lore.kernel.org/linux-sparse \
		linux-sparse@vger.kernel.org
	public-inbox-index linux-sparse

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sparse


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git