linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] fix usual conversion of integers
@ 2020-10-05 23:03 Luc Van Oostenryck
  2020-10-05 23:03 ` [PATCH 1/4] add builtin type pointer to bool: bool_ptr_ctype Luc Van Oostenryck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luc Van Oostenryck @ 2020-10-05 23:03 UTC (permalink / raw)
  To: linux-sparse; +Cc: Luc Van Oostenryck

The current implementation of the usual conversion doesn't handle
correctly the case of 'long' + 'unsigned int' on a 32-bit arch.
The resulting type is 'unsigned int' instead of 'unsigned long'.

Fix this by following closely the C99's wording.
This now gives the expected result for C89 & C99 on 32 & 64-bit archs
(as tested with the GCC testsuite).

Luc Van Oostenryck (4):
  add builtin type pointer to bool: bool_ptr_ctype
  fix prototype of __sync_bool_compare_and_swap()
  fix evaluation of pointer to bool conversions
  fix usual conversion of integers

 builtin.c                          |  2 +-
 evaluate.c                         | 67 ++++++++++++++++--------------
 symbol.c                           |  2 +
 symbol.h                           |  1 +
 validation/linear/bool-cast-lp32.c |  1 -
 5 files changed, 40 insertions(+), 33 deletions(-)

-- 
2.28.0


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

end of thread, other threads:[~2020-10-05 23:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 23:03 [PATCH 0/4] fix usual conversion of integers Luc Van Oostenryck
2020-10-05 23:03 ` [PATCH 1/4] add builtin type pointer to bool: bool_ptr_ctype Luc Van Oostenryck
2020-10-05 23:03 ` [PATCH 2/4] fix prototype of __sync_bool_compare_and_swap() Luc Van Oostenryck
2020-10-05 23:04 ` [PATCH 3/4] fix evaluation of pointer to bool conversions Luc Van Oostenryck
2020-10-05 23:04 ` [PATCH 4/4] fix usual conversion of integers 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).