From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] Add -Wcast-qual flag Date: Thu, 21 Dec 2006 13:28:10 +0000 Message-ID: References: <458A915B.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <458A915B.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Christoph Egger , xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org On 21/12/06 12:51, "Jan Beulich" wrote: > While I'd really like to see all Xen code become const-correct (because I do > believe this helps with code quality, like does marking read only data read > only in the page tables), I don't think adding the warning here is > appropriate - after all, in C this is one of the purposes of adding explicit > casts (although I agree it's questionable to use casts for this purpose). > And no, I don't think that many people screwing up const placement is a > proper argument for not using const where possible. Well, I'm inclined to take the clean-up parts of the patches but leave out __UNCONST() and -Wcast-qual. I really dislike the compiler thinking it knows better than an explicit cast, and casting via unsigned long is just a kludge. -- Keir