From: "Jan Beulich" <jbeulich@novell.com>
To: Christoph Egger <Christoph.Egger@amd.com>,
xen-devel@lists.xensource.com, Keir Fraser <keir@xensource.com>
Subject: Re: [PATCH] Add -Wcast-qual flag
Date: Thu, 21 Dec 2006 12:51:23 +0000 [thread overview]
Message-ID: <458A915B.76E4.0078.0@novell.com> (raw)
In-Reply-To: <C1B01571.6AE9%keir@xensource.com>
>>> Keir Fraser <keir@xensource.com> 21.12.06 11:41 >>>
>On 21/12/06 10:05, "Christoph Egger" <Christoph.Egger@amd.com> wrote:
>
>> The xen-cast.diff adds the -Wcast-qual flag.
>
>We don't enable this flag precisely because we end up needing to scatter
>const all over the place like confetti. I'm not convinced that use of const
>improves code quality. I fear we'd end up with 'const foo * const bar' all
>over the place -- ugly and confusing to most programmers (who frequently
>mess up const placement, in my experience).
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.
Jan
next prev parent reply other threads:[~2006-12-21 12:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 10:05 [PATCH] Add -Wcast-qual flag Christoph Egger
2006-12-21 10:41 ` Keir Fraser
2006-12-21 11:12 ` Christoph Egger
2006-12-21 12:51 ` Jan Beulich [this message]
2006-12-21 13:25 ` Christoph Egger
2006-12-21 13:28 ` Keir Fraser
2006-12-21 14:18 ` Jan Beulich
2006-12-21 14:56 ` Christoph Egger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=458A915B.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=Christoph.Egger@amd.com \
--cc=keir@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.