linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] teach sparse about union casts
@ 2020-08-15 15:28 Luc Van Oostenryck
  2020-08-15 15:28 ` [PATCH 1/3] union-cast: add some testcases Luc Van Oostenryck
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luc Van Oostenryck @ 2020-08-15 15:28 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

This series adds support for union casts which otherwise give
technically exact diagnostic messages:
	warning: cast to non-scalar
But these warnings are not interesting because GCC and clang
support these casts, they are used in the kernel (but not much:
~13 in the usual x86 configs) and they are not especially dangerous
(like losing bits or cheating with types).


Luc Van Oostenryck (3):
  union-cast: add some testcases
  union-cast: extract evaluate_compound_literal()
  union-cast: teach sparse about union casts

 Documentation/release-notes/v0.6.3.rst |  5 ++
 evaluate.c                             | 88 ++++++++++++++++++++------
 options.c                              |  2 +
 options.h                              |  1 +
 sparse.1                               |  6 ++
 validation/eval/union-cast-no.c        | 23 +++++++
 validation/eval/union-cast.c           | 24 +++++++
 7 files changed, 129 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/release-notes/v0.6.3.rst
 create mode 100644 validation/eval/union-cast-no.c
 create mode 100644 validation/eval/union-cast.c


base-commit: 49f7e13a7ac9a582d11e9c1ad01e71740f486601
-- 
2.28.0


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

end of thread, other threads:[~2020-08-15 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-15 15:28 [PATCH 0/3] teach sparse about union casts Luc Van Oostenryck
2020-08-15 15:28 ` [PATCH 1/3] union-cast: add some testcases Luc Van Oostenryck
2020-08-15 15:28 ` [PATCH 2/3] union-cast: extract evaluate_compound_literal() Luc Van Oostenryck
2020-08-15 15:28 ` [PATCH 3/3] union-cast: teach sparse about union casts Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).