Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262564AbUCJKPr (ORCPT ); Wed, 10 Mar 2004 05:15:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262568AbUCJKPr (ORCPT ); Wed, 10 Mar 2004 05:15:47 -0500 Received: from lon-mail-5.gradwell.net ([193.111.201.131]:15624 "HELO lon-mail-5.gradwell.net") by vger.kernel.org with SMTP id S262564AbUCJKPq (ORCPT ); Wed, 10 Mar 2004 05:15:46 -0500 Date: Wed, 10 Mar 2004 10:15:44 +0000 (UTC) From: "Joseph S. Myers" X-X-Sender: jsm28@digraph.polyomino.org.uk To: Neil Booth cc: Linus Torvalds , Thomas Schlichter , Andrew Morton , linux-kernel@vger.kernel.org, gcc@gcc.gnu.org Subject: Re: [PATCH] fix warning about duplicate 'const' In-Reply-To: <20040310064001.GA7584@daikokuya.co.uk> Message-ID: References: <200403090043.21043.thomas.schlichter@web.de> <20040308161410.49127bdf.akpm@osdl.org> <200403090217.40867.thomas.schlichter@web.de> <20040310054918.GB4068@twiddle.net> <20040310064001.GA7584@daikokuya.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 27 On Wed, 10 Mar 2004, Neil Booth wrote: > > seems dicey at best. I'm not sure what to do about this, actually. > > We might could do something with a new __nonqual_typeof(a) that > > strips outermost type qualifications, but I havn't given that much > > thought. > > Or you could compile in C99 mode? The gnu89-only kludge allowing compound literals in static initializers in certain cases, for compatibility with their old ill-defined semantics, is there because it was needed by Linux; I don't know if it's still needed, but that would prevent compiling in C99 mode where compound literals have only their C99 semantics as unnamed variables. Simpler to restrict the pedwarns for duplicate qualifiers to (pedantic && !flag_isoc99) (in all the various cases warned for) and document this as an extension from C99 that is accepted in C89/C90 mode. -- Joseph S. Myers jsm@polyomino.org.uk - 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/