From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "Krzysztof Halasa" <khc@pm.waw.pl>
Cc: linux-kernel@vger.kernel.org, "Andrew Morton" <akpm@osdl.org>,
"Nikita Danilov" <nikita@clusterfs.com>,
"Joe Perches" <joe@perches.com>,
"Martin Waitz" <tali@admingilde.org>,
"Jan-Benedict Glaw" <jbglaw@lug-owl.de>,
"Christoph Hellwig" <hch@infradead.org>,
"David Woodhouse" <dwmw2@infradead.org>,
"Arjan van de Ven" <arjan@infradead.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Valdis Kletnieks" <Valdis.Kletnieks@vt.edu>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Russell King" <rmk@arm.linux.org.uk>,
"Rusty Russell" <rusty@rustcorp.com.au>,
"Randy Dunlap" <rdunlap@xenotime.net>
Subject: Re: [PATCH 00/12] making the kernel -Wshadow clean - The initial step
Date: Sun, 30 Jul 2006 19:14:06 +0200 [thread overview]
Message-ID: <9a8748490607301014rf04b6cew9d991635a7834277@mail.gmail.com> (raw)
In-Reply-To: <m3ac6rkp8c.fsf@defiant.localdomain>
On 30/07/06, Krzysztof Halasa <khc@pm.waw.pl> wrote:
> Hi,
>
Hi Krzysztof,
> Jesper Juhl <jesper.juhl@gmail.com> writes:
>
> > This is a series of patches that try to be an initial step towards making
> > the kernel build -Wshadow clean.
>
> I'm not sure such patches improve situation.
>
> > It'll help us keep our namespaces separate.
>
> Nope, it's exactly opposite - now we have separate namespaces and
> -Wshadow reduces that separation.
>
I don't agree. -Wshadow lets the compiler help you ensure that you
don't accidentally use a symbol from a local scope when you think you
are using one from an enclosing scope (global or not).
Bugs resulting from such use can be hard to track down and if we can
get the compiler to help us avoid them I think that's a win.
> Currently you don't have to worry about the universe when you write
> a piece of code, and more importantly the universe doesn't have to
> worry about each function and each private variable. I'm not sure
> changing that is a good idea.
I think it's a good thing that we have to take a little more care when
choosing global function and variable names... Take up() for example -
in my (very humble) oppinion that is a very bad name for a global
function - it clashes too easily with local function and variable
names, and a programmer who's not careful may end up calling the
global up() when he wants the local and vice versa (a much better name
would have been sem_up() - should we change that???).
I think it's a good think if we in the future name our global stuff
with more care and stick a big fat warning in the face of programmers
who introduce local stuff that shadows something else.
I don't agree with you and I don't know how to convince you, but I
still appreciate your feedback.
Thanks.
I'll leave it to people higher in the hierarchy to decide if these
patches should be applied or not ;)
Keep that feedback flowing people :-)
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
next prev parent reply other threads:[~2006-07-30 17:14 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-30 16:30 Jesper Juhl
2006-07-30 16:35 ` [PATCH 01/12] making the kernel -Wshadow clean - fix mconf Jesper Juhl
2006-07-30 18:34 ` Paul Jackson
2006-07-30 18:48 ` Jesper Juhl
2006-07-30 19:06 ` Andrew Morton
2006-07-30 19:17 ` Jesper Juhl
2006-07-30 19:51 ` Andrew Morton
2006-07-30 19:57 ` Arjan van de Ven
2006-07-30 20:03 ` Jesper Juhl
2006-07-30 19:32 ` Paul Jackson
2006-07-30 23:41 ` Arnd Bergmann
2006-07-31 15:41 ` Horst H. von Brand
2006-07-31 16:04 ` H. Peter Anvin
2006-07-30 16:36 ` [PATCH 02/12] making the kernel -Wshadow clean - fix lxdialog Jesper Juhl
2006-07-30 16:37 ` [PATCH 03/12] making the kernel -Wshadow clean - fix jiffies.h Jesper Juhl
2006-07-30 16:38 ` [PATCH 04/12] making the kernel -Wshadow clean - warnings related to 'up' Jesper Juhl
2006-07-30 16:38 ` [PATCH 05/12] making the kernel -Wshadow clean - warnings related to wbc and map_bh Jesper Juhl
2006-07-30 16:39 ` [PATCH 06/12] making the kernel -Wshadow clean - fix checksum Jesper Juhl
2006-07-30 16:40 ` [PATCH 07/12] making the kernel -Wshadow clean - fix vgacon Jesper Juhl
2006-07-30 16:41 ` [PATCH 08/12] making the kernel -Wshadow clean - fix keyboard.c Jesper Juhl
2006-07-30 16:42 ` [PATCH 09/12] making the kernel -Wshadow clean - neighbour.h and 'proc_handler' Jesper Juhl
2006-07-30 16:42 ` [PATCH 10/12] making the kernel -Wshadow clean - mm/truncate.c Jesper Juhl
2006-07-30 16:43 ` [PATCH 11/12] making the kernel -Wshadow clean - USB & completion Jesper Juhl
2006-07-30 16:44 ` [PATCH 12/12] making the kernel -Wshadow clean - 'irq' shadows local and global Jesper Juhl
2006-07-30 16:54 ` [PATCH 00/12] making the kernel -Wshadow clean - The initial step Krzysztof Halasa
2006-07-30 17:14 ` Jesper Juhl [this message]
2006-07-30 17:27 ` Krzysztof Halasa
2006-07-30 18:29 ` Andrew Morton
2006-07-30 23:36 ` Arnd Bergmann
2006-08-01 6:17 ` Jan Engelhardt
2006-07-30 19:24 ` Jesper Juhl
2006-07-30 20:09 ` Jan-Benedict Glaw
2006-07-30 19:29 ` Sam Ravnborg
2006-07-30 19:39 ` Jesper Juhl
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=9a8748490607301014rf04b6cew9d991635a7834277@mail.gmail.com \
--to=jesper.juhl@gmail.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=dmitry.torokhov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hch@infradead.org \
--cc=jbglaw@lug-owl.de \
--cc=joe@perches.com \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita@clusterfs.com \
--cc=rdunlap@xenotime.net \
--cc=rmk@arm.linux.org.uk \
--cc=rusty@rustcorp.com.au \
--cc=sam@ravnborg.org \
--cc=tali@admingilde.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®