Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261429AbUCIBZl (ORCPT ); Mon, 8 Mar 2004 20:25:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261436AbUCIBZl (ORCPT ); Mon, 8 Mar 2004 20:25:41 -0500 Received: from fw.osdl.org ([65.172.181.6]:59529 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261429AbUCIBZd (ORCPT ); Mon, 8 Mar 2004 20:25:33 -0500 Date: Mon, 8 Mar 2004 17:32:11 -0800 (PST) From: Linus Torvalds To: Thomas Schlichter cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fix warning about duplicate 'const' In-Reply-To: <200403090217.40867.thomas.schlichter@web.de> Message-ID: References: <200403090043.21043.thomas.schlichter@web.de> <20040308161410.49127bdf.akpm@osdl.org> <200403090217.40867.thomas.schlichter@web.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1272 Lines: 39 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/