From owner-svn-src-all@FreeBSD.ORG Thu Aug 22 11:49:37 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E882D587; Thu, 22 Aug 2013 11:49:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 597682616; Thu, 22 Aug 2013 11:49:34 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 707643C408A; Thu, 22 Aug 2013 21:49:20 +1000 (EST) Date: Thu, 22 Aug 2013 21:49:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Subject: Re: svn commit: r254626 - stable/9/usr.bin/yacc In-Reply-To: <86y57ugn00.fsf@nine.des.no> Message-ID: <20130822213005.H1824@besplex.bde.org> References: <201308212257.r7LMvUmY053608@svn.freebsd.org> <8638q2i1oo.fsf@nine.des.no> <86y57ugn00.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-597222542-1377172158=:1824" X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=Tjuh2rCmyooA:10 a=JzwRw_2MAAAA:8 a=-2CbWcZpqT0A:10 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=QsAagnHujDszEWpeXfwA:9 a=45ClL6m2LaAA:10 Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org, "David E. O'Brien" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 11:49:38 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-597222542-1377172158=:1824 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 22 Aug 2013, [utf-8] Dag-Erling Sm=C3=B8rgrav wrote: > Dag-Erling Sm=C3=B8rgrav writes: >> This breaks the build in usr.bin/expr because expr.y already provides a >> prototype, and gcc does not accept multiple prototypes, even if they're >> identical. That is arguably a bug in gcc, ISTR that it took several rounds of changes to fix the same bug in -current in expr and many other places. > Oh, it's actually our own fault for including -Wredundant-decls in > CFLAGS. Is there a good reason to keep it? > > -Wredundant-decls > Warn if anything is declared more than once in the same scope, = even > in cases where multiple declaration is valid and changes nothin= g. How else would you detect bogus declarations of library functions? Almost all -W flags are for detecting bugs that are mostly style bugs like this one. This one only becomes more than a style bug if: - the declaration becomes wrong - the header with the correct declaration becomes not included. Another bug in the commit is that it auto-generates code with a style bug (redundant extern). yacc in -current seems to auto-generate a function prototype for just one function (the same one), and this has the style bug too. This may be needed for K&R1 version compilers from 1978, but not for the STDC case. Bruce --0-597222542-1377172158=:1824--