From: Linus Torvalds <torvalds@osdl.org>
To: Thomas Schlichter <thomas.schlichter@web.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix warning about duplicate 'const'
Date: Mon, 8 Mar 2004 17:32:11 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0403081728250.9575@ppc970.osdl.org> (raw)
In-Reply-To: <200403090217.40867.thomas.schlichter@web.de>
On Tue, 9 Mar 2004, Thomas Schlichter wrote:
>
> Am Dienstag, 9. März 2004 01:32 schrieb Linus Torvalds:
>
> ~~ snip ~~
>
> > The warnings the extra "const" fixes is something like:
> >
> > int a;
> > const int b;
> >
> > min(a,b)
> >
> > where otherwise it would complain about pointers to different types when
> > comparing the type of the pointer. Or something.
>
> OK, I tested it and gcc 3.3.1 does not complain about this. So with my patch,
> the duplicate 'const' warning goes away here and no other warning occours...
Yeah, but do keep in mind that "something like" comment. I'm by no means
sure that I remembered the exact reason correctly, and maybe they aren't
really needed.
Also, I'm not convinced this isn't a gcc regression. It would be stupid to
"fix" something that makes old gcc's complain, when they may be doing the
right thing.
All that code was from early 2002 (around 2.4.9), so maybe somebody can
find the full discussion on the linux-kernel archives from January 2002 or
so?
Linus
next prev parent reply other threads:[~2004-03-09 1:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-08 23:43 Thomas Schlichter
2004-03-09 0:14 ` Andrew Morton
2004-03-09 0:32 ` Linus Torvalds
2004-03-09 1:17 ` Thomas Schlichter
2004-03-09 1:32 ` Linus Torvalds [this message]
2004-03-09 1:35 ` Linus Torvalds
2004-03-10 4:08 ` Keith Duthie
[not found] ` <20040310054918.GB4068@twiddle.net>
2004-03-10 8:10 ` Gabriel Dos Reis
[not found] ` <20040310064001.GA7584@daikokuya.co.uk>
2004-03-10 10:15 ` Joseph S. Myers
2004-03-10 15:43 ` Linus Torvalds
2004-03-10 18:22 ` Richard Henderson
2004-03-10 18:29 ` Andrew Haley
2004-03-10 18:35 ` Paul Koning
2004-03-10 18:37 ` Richard Henderson
2004-03-16 1:46 ` Mike Stump
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=Pine.LNX.4.58.0403081728250.9575@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.schlichter@web.de \
/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®