Re: [PATCH] Re: Sparse just seg faulted on me!

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

 




On Wed, 14 Feb 2007, Christopher Li wrote:
> > 
> > It's nice if a NULL type means "type has not been evaluated yet", and then 
> > using "&bad_ctype" to mean "type evaluated to crap".
> 
> Good idea. Some of the code already doing that.

Yeah. I started out leaving bad stuff as NULL originally, but over time, 
as I noticed SIGSEGV's, I mostly changed the ones that I ended up having 
trigger to &bad_ctype.

Otherwise we either need to test for NULL all the time (and especially 
since NULL under _some_ circumstances is ok and means "not evaluated yet", 
that can be confusing), and having to pass up errors higher and higher up.

I at some point considered having a "silent bad_ctype" - a way of saying 
"ok, the type here is bad, but I already warned about the thing that 
_caused_ it to be bad, so don't warn any more about any type clashes".

But I don't think I ever did that, so now you often get two different 
warnings (first a warning about "no such symbol" or something and then a 
warning about "bad types to binary operation" or similar). Anyway, if 
somebody ever gets irritated about the duplicate warnings, I thought I'd 
mention that as a potential way to perhaps avoid havign things that 
already caused errors cause even more verbose errors up the chain..

		Linus
-
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