From: "Michael Frank" <mhf@linuxmail.org>
To: "David Weinehall" <tao@acc.umu.se>,
"Rene Herman" <rene.herman@keyaccess.nl>
Cc: "Horst von Brand" <vonbrand@inf.utfsm.cl>,
"Eyal Lebedinsky" <eyal@eyal.emu.id.au>,
linux-kernel@vger.kernel.org
Subject: Re: Linux 2.4.26-pre2
Date: Mon, 08 Mar 2004 04:58:52 +0800 [thread overview]
Message-ID: <opr4ie8ex74evsfm@smtp.pacific.net.th> (raw)
In-Reply-To: <20040307200509.GT19111@khan.acc.umu.se>
On Sun, 7 Mar 2004 21:05:09 +0100, David Weinehall <tao@acc.umu.se> wrote:
> On Sun, Mar 07, 2004 at 08:52:45PM +0100, Rene Herman wrote:
>> David Weinehall wrote:
>>
>> >>>In standard C we declare all variables at the top of a function. While
>> >>>some compilers allow extension, it is not a good idea to get used to
>> >>>them if we want portable code.
>> >>
>> >>Oh, come on. This is _kernel_ code, it won't ever be compiled with
>> >>anything
>> >>not GCC-compatible.
>> >
>> >Ugly warts don't become any less ugly just because gcc accepts them...
>>
>> Mixing code and declarations is also c99. For (a sane) gcc specifically,
>> you have to tell it -std=c89 -pedantic to have it even complain.
>
> Ok, didn't know that. Still doesn't make it any less ugly, though.
> There are quite a lot of things that a valid in C. That doesn't mean
> they should be used...
C99 is C++ish. I have my experience with these methods after following
the PopularCppWays for some time. HellIsThisCrap which I wrote a pain
to maintain...
When a function is short and concise, there is no need to worry about
the few variables at the top.
Regards
Michael
next prev parent reply other threads:[~2004-03-07 20:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-06 19:20 Marcelo Tosatti
2004-03-07 5:44 ` Eyal Lebedinsky
2004-03-07 16:19 ` Horst von Brand
2004-03-07 18:49 ` Roland Dreier
2004-03-07 19:42 ` Michael Frank
2004-03-07 19:25 ` David Weinehall
2004-03-07 19:52 ` Rene Herman
2004-03-07 19:58 ` Jeff Garzik
2004-03-07 20:05 ` David Weinehall
2004-03-07 20:58 ` Michael Frank [this message]
2004-03-07 20:08 ` Michal Schmidt
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=opr4ie8ex74evsfm@smtp.pacific.net.th \
--to=mhf@linuxmail.org \
--cc=eyal@eyal.emu.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.herman@keyaccess.nl \
--cc=tao@acc.umu.se \
--cc=vonbrand@inf.utfsm.cl \
/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®