[cairo] [PATCH 6/8] Don't use bare #if on possibly undefined preprocessor symbols

Pavel Roskin proski at gnu.org
Sun Feb 4 22:08:24 PST 2007


Hello!

On Wed, 2007-01-17 at 09:10 -0800, Carl Worth wrote:
> On Wed, 17 Jan 2007 11:55:30 -0500, Pavel Roskin wrote:
> > As for sparse, I'm going to request "#if SYMBOL" to be allowed.  I wrote
> > some patches for sparse before, so I hope my voice will be heard.
> 
> Sounds great. Josh is a very reasonable guy and very smart. If you
> give him a good idea, he'll generally accept it or come back with a
> better idea.

My suggestion wasn't well received at all, but I just could not afford
to continue that discussion due to lack of time.

> Oh, and speaking of sparse, would you like to add some Makefile
> targets for us so that we can all get some good sparse checking? Maybe
> as part of "make check"?

I don't think sparse is quite ready at this point to check userspace
software.  At very least, it needs support for transparent unions and
"restricted" pointers.

> And, I've talked to Josh about it a little bit, but I think there are
> big classes of things in cairo that sparse could help out with. For
> example, not mixing fixed-point numbers with straight integers---not
> mixing user-space values with device-space values etc. If someone
> wanted to do the (presumably very little) work to augment sparse to be
> able to do things like that, I'd be glad to accept some decorations
> throughout the source code to keep sparse happy.
> 
> I love compile-time checking---let's fix bugs before the users even
> run the code.

I'm afraid that you'll have to do it yourself, because it looks like I
did a terrible job at advocating use of sparse for non-kernel code.  I'd
rather not be in the role of a proxy again.

-- 
Regards,
Pavel Roskin



More information about the cairo mailing list