[RFC PATCH 0/2] allow casting unrestricted values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series permits casting a value to a restricted type when the value is
 not a restricted value for that type.  In other words, it lets you cast 0
 to a bitwise type, which is consistent with the rules for implicit
 conversions.

Being new to the sparse codebase, I'm not 100% sure that I've passed the
 right thing to restricted_value's 'type' argument, especially as that
 argument doesn't appear to actually be used.

Edward Cree (2):
  Allow casting to a restricted type if !restricted_value
  Add test case for casts to restricted types

 evaluate.c                |  2 +-
 validation/bitwise-cast.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 validation/bitwise-cast.c

---
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux