From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29512 invoked by alias); 10 Mar 2004 10:15:46 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29505 invoked from network); 10 Mar 2004 10:15:45 -0000 Received: from unknown (HELO lon-mail-5.gradwell.net) (193.111.201.131) by sources.redhat.com with SMTP; 10 Mar 2004 10:15:45 -0000 Received: (qmail 34724 invoked from network); 10 Mar 2004 10:15:44 -0000 Received: from digraph.polyomino.org.uk (postmaster%pop3.polyomino.org.uk@81.187.227.50) by lon-mail-5.gradwell.net with SMTP; 10 Mar 2004 10:15:44 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.30) id 1B10ka-0005uK-3b; Wed, 10 Mar 2004 10:15:44 +0000 Date: Wed, 10 Mar 2004 10:15:00 -0000 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 X-SW-Source: 2004-03/txt/msg00503.txt.bz2 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