Re: [RFC] explicitly signed and friends

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

 



Al,

4)
gcc is kinda-sorta tolerant to mixing pointers to signed and unsigned,
unless you explicitly ask to be strict.  However, it's nowhere near
as lenient as sparse.

Values wrapping because of signed/unsigned is a common cause of
faults.  In those contexts where the pointer is eventually dereferenced
to obtain a pointer I think sparse should continue to complain.

Differences of sign in pointer subtraction may or may not be regarded as
harmless.

I appreciate that gcc is currently an important compiler.  But I
know of several compiler groups who would like to be able to build
an executable kernel using their compiler.  Having sparse complain about
constructs that gcc is rather lax about means that those involved in
kernel development might fix the underlying problem in their code.
Such fixes are good in that they increase the probability that a
different compiler will successfully compile the kernel.  I think a
bit of competition in the kernel compiler market would help keep the
gcc people on their toes.

--
Derek M. Jones                              tel: +44 (0) 1252 520 667
Knowledge Software Ltd                      mailto:derek@xxxxxxxxxxxx
Applications Standards Conformance Testing    http://www.knosof.co.uk
-
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